Flutter Engine
The Flutter Engine
Functions | Variables
gen_fuchsia_test_manifest Namespace Reference

Functions

def parse_args (args)
 
def fuchsia_arch (arch)
 
def main (argv)
 

Variables

 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')
 
list EXCLUDE_DIRS = ['.git', 'out', '.jiri']
 
list BINARY_FILES = ['dart', 'run_vm_tests', 'process_test']
 

Function Documentation

◆ fuchsia_arch()

def gen_fuchsia_test_manifest.fuchsia_arch (   arch)

Definition at line 57 of file gen_fuchsia_test_manifest.py.

57def fuchsia_arch(arch):
58 if arch is 'x64':
59 return 'x86-64'
60 return None
61
62

◆ main()

def gen_fuchsia_test_manifest.main (   argv)

Definition at line 63 of file gen_fuchsia_test_manifest.py.

63def main(argv):
64 args = parse_args(argv)
65
66 manifest_output = args.output + '.manifest'
67 with open(manifest_output, 'w') as manifest:
68 # Write the Dart tree.
69 for root, dirs, files in os.walk(DART_ROOT):
70 dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS]
71 for file in files:
72 filepath = os.path.join(root, file)
73 relpath = filepath[len(DART_ROOT) + 1:]
74 fuchsiapath = os.path.join(FUCHSIA_TEST_MANIFEST_PREFIX,
75 relpath)
76 manifest.write(
77 '%s=%s\n' % (fuchsiapath, os.path.join(root, file)))
78
79 dart_conf = utils.GetBuildConf(args.mode, args.arch)
80 dart_out = os.path.join(FUCHSIA_TEST_MANIFEST_PREFIX, 'out', dart_conf)
81 fuchsia_conf = '%s-%s' % (args.mode, fuchsia_arch(args.arch))
82 fuchsia_out = os.path.join(FUCHSIA_ROOT, 'out', fuchsia_conf)
83 for file in BINARY_FILES:
84 manifest.write('%s=%s\n' % (os.path.join(dart_out, file),
85 os.path.join(fuchsia_out, file)))
86
87 return 0
88
89
def GetBuildConf(mode, arch)
Definition: utils.py:139
static void parse_args(int argc, char *argv[], Args *args)
Definition: skqp_main.cpp:97

◆ parse_args()

def gen_fuchsia_test_manifest.parse_args (   args)

Definition at line 26 of file gen_fuchsia_test_manifest.py.

26def parse_args(args):
27 args = args[1:]
28 parser = argparse.ArgumentParser(
29 description='A script that generates Dart/Fuchsia test commands.')
30
31 parser.add_argument(
32 '--arch',
33 '-a',
34 type=str,
35 help='Target architectures (comma-separated).',
36 metavar='[x64]',
37 default='x64')
38 parser.add_argument(
39 '--mode',
40 '-m',
41 type=str,
42 help='Build variant',
43 metavar='[debug,release]',
44 default='debug')
45 parser.add_argument(
46 '--output', '-o', type=str, help='Path to output file prefix.')
47 parser.add_argument(
48 "-v",
49 "--verbose",
50 help='Verbose output.',
51 default=False,
52 action="store_true")
53
54 return parser.parse_args(args)
55
56

Variable Documentation

◆ BINARY_FILES

list gen_fuchsia_test_manifest.BINARY_FILES = ['dart', 'run_vm_tests', 'process_test']

Definition at line 23 of file gen_fuchsia_test_manifest.py.

◆ DART_ROOT

gen_fuchsia_test_manifest.DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))

Definition at line 16 of file gen_fuchsia_test_manifest.py.

◆ EXCLUDE_DIRS

list gen_fuchsia_test_manifest.EXCLUDE_DIRS = ['.git', 'out', '.jiri']

Definition at line 21 of file gen_fuchsia_test_manifest.py.

◆ FUCHSIA_ROOT

gen_fuchsia_test_manifest.FUCHSIA_ROOT = os.path.realpath(os.path.join(DART_ROOT, '..', '..'))

Definition at line 17 of file gen_fuchsia_test_manifest.py.

◆ FUCHSIA_TEST_MANIFEST_PREFIX

gen_fuchsia_test_manifest.FUCHSIA_TEST_MANIFEST_PREFIX = os.path.join('test', 'dart')

Definition at line 19 of file gen_fuchsia_test_manifest.py.

◆ SCRIPT_DIR

gen_fuchsia_test_manifest.SCRIPT_DIR = os.path.dirname(sys.argv[0])

Definition at line 15 of file gen_fuchsia_test_manifest.py.