[infra] Shard Fuchsia ARM64 builder.
Also remove some dead Fuchsia scripts. Change-Id: I87349973e2f192cb8472bb2b5c18049025950760 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508362 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
164cfda948
commit
8b4420c381
@@ -196,6 +196,17 @@
|
||||
"runtime/",
|
||||
"sdk/",
|
||||
".dart_tool/package_config.json"
|
||||
],
|
||||
"fuchsia": [
|
||||
".dart_tool/package_config.json",
|
||||
"build/fuchsia/",
|
||||
"out/ReleaseFuchsiaARM64/gen/dart_test/",
|
||||
"pkg/",
|
||||
"samples/",
|
||||
"tests/",
|
||||
"third_party/fuchsia/",
|
||||
"third_party/pkg/",
|
||||
"tools/"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
@@ -1683,7 +1694,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"name": "vm jit tests",
|
||||
"arguments": [
|
||||
"-nvm-${system}-${mode}-${arch}",
|
||||
"-j8",
|
||||
@@ -1691,7 +1702,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"name": "vm aot tests",
|
||||
"arguments": [
|
||||
"-nvm-aot-${system}-${mode}-${arch}",
|
||||
"-j8",
|
||||
@@ -1717,15 +1728,17 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"name": "vm jit tests",
|
||||
"arguments": [
|
||||
"-nvm-${system}-${mode}-${arch}",
|
||||
"-j1",
|
||||
"ffi"
|
||||
]
|
||||
],
|
||||
"fileset": "fuchsia",
|
||||
"shards": 3
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"name": "vm aot tests",
|
||||
"arguments": [
|
||||
"-nvm-aot-${system}-${mode}-${arch}",
|
||||
"-j1",
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2016 The Dart project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Usage: create_pkg_manifest.py --deps <DEPS file> --output <jiri manifest>
|
||||
#
|
||||
# This script parses the DEPS file, extracts dependencies that live under
|
||||
# third_party/pkg, and writes them to a file suitable for consumption as a
|
||||
# jiri manifest for Fuchsia. It is assumed that the Dart tree is under
|
||||
# //dart in the Fuchsia world, and so the dependencies extracted by this script
|
||||
# will go under //dart/third_party/pkg.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
import utils
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(sys.argv[0])
|
||||
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
|
||||
|
||||
|
||||
# Used in parsing the DEPS file.
|
||||
class VarImpl(object):
|
||||
_env_vars = {
|
||||
"host_cpu": "x64",
|
||||
"host_os": "linux",
|
||||
}
|
||||
|
||||
def __init__(self, local_scope):
|
||||
self._local_scope = local_scope
|
||||
|
||||
def Lookup(self, var_name):
|
||||
"""Implements the Var syntax."""
|
||||
if var_name in self._local_scope.get("vars", {}):
|
||||
return self._local_scope["vars"][var_name]
|
||||
# Inject default values for env variables
|
||||
if var_name in self._env_vars:
|
||||
return self._env_vars[var_name]
|
||||
raise Exception("Var is not defined: %s" % var_name)
|
||||
|
||||
|
||||
def ParseDepsFile(deps_file):
|
||||
local_scope = {}
|
||||
var = VarImpl(local_scope)
|
||||
global_scope = {
|
||||
'Var': var.Lookup,
|
||||
'deps_os': {},
|
||||
}
|
||||
# Read the content.
|
||||
with open(deps_file, 'r') as fp:
|
||||
deps_content = fp.read()
|
||||
|
||||
# Eval the content.
|
||||
exec (deps_content, global_scope, local_scope)
|
||||
|
||||
# Extract the deps and filter.
|
||||
deps = local_scope.get('deps', {})
|
||||
filtered_deps = {}
|
||||
for k, v in deps.items():
|
||||
if 'sdk/third_party/pkg' in k:
|
||||
new_key = k.replace('sdk', 'third_party/dart', 1)
|
||||
filtered_deps[new_key] = v
|
||||
|
||||
return filtered_deps
|
||||
|
||||
|
||||
def WriteManifest(deps, manifest_file):
|
||||
project_template = """
|
||||
<project name="%s"
|
||||
path="%s"
|
||||
remote="%s"
|
||||
revision="%s"/>
|
||||
"""
|
||||
warning = (
|
||||
'<!-- This file is generated by '
|
||||
'//third_party/dart/tools/create_pkg_manifest.py. DO NOT EDIT -->\n')
|
||||
with open(manifest_file, 'w') as manifest:
|
||||
manifest.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
manifest.write(warning)
|
||||
manifest.write('<manifest>\n')
|
||||
manifest.write(' <projects>\n')
|
||||
for path, remote in sorted(deps.items()):
|
||||
remote_components = remote.split('@')
|
||||
remote_url = remote_components[0]
|
||||
remote_version = remote_components[1]
|
||||
manifest.write(
|
||||
project_template % (path, path, remote_url, remote_version))
|
||||
manifest.write(' </projects>\n')
|
||||
manifest.write('</manifest>\n')
|
||||
|
||||
|
||||
def ParseArgs(args):
|
||||
args = args[1:]
|
||||
parser = argparse.ArgumentParser(
|
||||
description='A script to generate a jiri manifest for third_party/pkg.')
|
||||
|
||||
parser.add_argument(
|
||||
'--deps',
|
||||
'-d',
|
||||
type=str,
|
||||
help='Input DEPS file.',
|
||||
default=os.path.join(DART_ROOT, 'DEPS'))
|
||||
parser.add_argument(
|
||||
'--output',
|
||||
'-o',
|
||||
type=str,
|
||||
help='Output jiri manifest.',
|
||||
default=os.path.join(DART_ROOT, 'dart_third_party_pkg.manifest'))
|
||||
|
||||
return parser.parse_args(args)
|
||||
|
||||
|
||||
def Main(argv):
|
||||
args = ParseArgs(argv)
|
||||
deps = ParseDepsFile(args.deps)
|
||||
WriteManifest(deps, args.output)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(Main(sys.argv))
|
||||
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2017 The Dart project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This script creates a qemu image manifest for Fuchsia that contains the
|
||||
# Dart tree. In particular in contains Dart's test suite, and test harness.
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import utils
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(sys.argv[0])
|
||||
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
|
||||
FUCHSIA_ROOT = os.path.realpath(os.path.join(DART_ROOT, '..', '..'))
|
||||
|
||||
FUCHSIA_TEST_MANIFEST_PREFIX = os.path.join('test', 'dart')
|
||||
|
||||
EXCLUDE_DIRS = ['.git', 'out', '.jiri']
|
||||
|
||||
BINARY_FILES = ['dart', 'run_vm_tests', 'process_test']
|
||||
|
||||
|
||||
def parse_args(args):
|
||||
args = args[1:]
|
||||
parser = argparse.ArgumentParser(
|
||||
description='A script that generates Dart/Fuchsia test commands.')
|
||||
|
||||
parser.add_argument(
|
||||
'--arch',
|
||||
'-a',
|
||||
type=str,
|
||||
help='Target architectures (comma-separated).',
|
||||
metavar='[x64]',
|
||||
default='x64')
|
||||
parser.add_argument(
|
||||
'--mode',
|
||||
'-m',
|
||||
type=str,
|
||||
help='Build variant',
|
||||
metavar='[debug,release]',
|
||||
default='debug')
|
||||
parser.add_argument(
|
||||
'--output', '-o', type=str, help='Path to output file prefix.')
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
"--verbose",
|
||||
help='Verbose output.',
|
||||
default=False,
|
||||
action="store_true")
|
||||
|
||||
return parser.parse_args(args)
|
||||
|
||||
|
||||
def fuchsia_arch(arch):
|
||||
if arch is 'x64':
|
||||
return 'x86-64'
|
||||
return None
|
||||
|
||||
|
||||
def main(argv):
|
||||
args = parse_args(argv)
|
||||
|
||||
manifest_output = args.output + '.manifest'
|
||||
with open(manifest_output, 'w') as manifest:
|
||||
# Write the Dart tree.
|
||||
for root, dirs, files in os.walk(DART_ROOT):
|
||||
dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS]
|
||||
for file in files:
|
||||
filepath = os.path.join(root, file)
|
||||
relpath = filepath[len(DART_ROOT) + 1:]
|
||||
fuchsiapath = os.path.join(FUCHSIA_TEST_MANIFEST_PREFIX,
|
||||
relpath)
|
||||
manifest.write(
|
||||
'%s=%s\n' % (fuchsiapath, os.path.join(root, file)))
|
||||
|
||||
dart_conf = utils.GetBuildConf(args.mode, args.arch)
|
||||
dart_out = os.path.join(FUCHSIA_TEST_MANIFEST_PREFIX, 'out', dart_conf)
|
||||
fuchsia_conf = '%s-%s' % (args.mode, fuchsia_arch(args.arch))
|
||||
fuchsia_out = os.path.join(FUCHSIA_ROOT, 'out', fuchsia_conf)
|
||||
for file in BINARY_FILES:
|
||||
manifest.write('%s=%s\n' % (os.path.join(dart_out, file),
|
||||
os.path.join(fuchsia_out, file)))
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
Reference in New Issue
Block a user