MCPcopy Create free account
hub / github.com/nodejs/node / main

Function main

deps/v8/test/test262/tools/export.py:13–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12
13def main():
14 parser = ArgumentParser()
15 parser.add_argument(
16 '-t',
17 '--blink-tools-path',
18 help=("Absolute path to where blink tools are located "
19 "(usually inside a local chromium checkout)."))
20 parser.add_argument(
21 '--config-path',
22 help="Absolute path to a project configuration json file.",
23 default=(Path(__file__).parent / 'v8configs.json'))
24 parser.add_argument(
25 '--approver',
26 help="Flag indicating that this run will only approve and merge "
27 "exisiting PRs. Approval of these PRs needs to be done by an account "
28 "different from the one that created the PR.",
29 action="store_true")
30 args, exporter_args = parser.parse_known_args(sys.argv)
31
32 sys.path.append(args.blink_tools_path)
33 from blinkpy.common import exit_codes
34 from blinkpy.common.host import Host
35 from blinkpy.common.path_finder import add_depot_tools_dir_to_os_path
36
37 from v8_exporter import V8TestExporter, V8TestApprover
38 from v8configs import config_from_file
39
40 add_depot_tools_dir_to_os_path()
41 host = Host(project_config_factory=config_from_file(args.config_path))
42 exporter = (V8TestApprover if args.approver else V8TestExporter)(host)
43 try:
44 success = exporter.main(exporter_args[1:])
45 host.exit(0 if success else 1)
46 except KeyboardInterrupt:
47 host.print_('Interrupted, exiting')
48 host.exit(exit_codes.INTERRUPTED_EXIT_STATUS)
49
50
51if __name__ == '__main__':

Callers 1

export.pyFile · 0.70

Calls 7

config_from_fileFunction · 0.90
ArgumentParserClass · 0.85
print_Method · 0.80
add_argumentMethod · 0.45
appendMethod · 0.45
mainMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected