MCPcopy Index your code
hub / github.com/nodejs/node / main

Function main

tools/gyp/test_gyp.py:28–143  ·  view source on GitHub ↗
(argv=None)

Source from the content-addressed store, hash-verified

26
27
28def main(argv=None):
29 if argv is None:
30 argv = sys.argv
31
32 parser = argparse.ArgumentParser()
33 parser.add_argument("-a", "--all", action="store_true", help="run all tests")
34 parser.add_argument("-C", "--chdir", action="store", help="change to directory")
35 parser.add_argument(
36 "-f",
37 "--format",
38 action="store",
39 default="",
40 help="run tests with the specified formats",
41 )
42 parser.add_argument(
43 "-G",
44 "--gyp_option",
45 action="append",
46 default=[],
47 help="Add -G options to the gyp command line",
48 )
49 parser.add_argument(
50 "-l", "--list", action="store_true", help="list available tests and exit"
51 )
52 parser.add_argument(
53 "-n",
54 "--no-exec",
55 action="store_true",
56 help="no execute, just print the command line",
57 )
58 parser.add_argument(
59 "--path", action="append", default=[], help="additional $PATH directory"
60 )
61 parser.add_argument(
62 "-q",
63 "--quiet",
64 action="store_true",
65 help="quiet, don't print anything unless there are failures",
66 )
67 parser.add_argument(
68 "-v",
69 "--verbose",
70 action="store_true",
71 help="print configuration info and test results.",
72 )
73 parser.add_argument("tests", nargs="*")
74 args = parser.parse_args(argv[1:])
75
76 if args.chdir:
77 os.chdir(args.chdir)
78
79 if args.path:
80 extra_path = [os.path.abspath(p) for p in args.path]
81 extra_path = os.pathsep.join(extra_path)
82 os.environ["PATH"] = extra_path + os.pathsep + os.environ["PATH"]
83
84 if not args.tests:
85 if not args.all:

Callers 1

test_gyp.pyFile · 0.70

Calls 15

runMethod · 0.95
print_resultsMethod · 0.95
find_all_gyptest_filesFunction · 0.85
is_test_nameFunction · 0.85
print_configuration_infoFunction · 0.85
chdirMethod · 0.80
RunnerClass · 0.70
printFunction · 0.50
add_argumentMethod · 0.45
parse_argsMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…