Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: tools/run-tests.py

Issue 2393863002: [inspector] Add swarming support to inspector tests (Closed)
Patch Set: Detach from dependent patchset Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/optimize_for_size.isolate ('k') | tools/testrunner/testrunner.isolate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 # Map of test name synonyms to lists of test suites. Should be ordered by 62 # Map of test name synonyms to lists of test suites. Should be ordered by
63 # expected runtimes (suites with slow test cases first). These groups are 63 # expected runtimes (suites with slow test cases first). These groups are
64 # invoked in seperate steps on the bots. 64 # invoked in seperate steps on the bots.
65 TEST_MAP = { 65 TEST_MAP = {
66 # This needs to stay in sync with test/bot_default.isolate. 66 # This needs to stay in sync with test/bot_default.isolate.
67 "bot_default": [ 67 "bot_default": [
68 "mjsunit", 68 "mjsunit",
69 "cctest", 69 "cctest",
70 "webkit", 70 "webkit",
71 "inspector",
71 "fuzzer", 72 "fuzzer",
72 "message", 73 "message",
73 "preparser", 74 "preparser",
74 "intl", 75 "intl",
75 "unittests", 76 "unittests",
76 ], 77 ],
77 # This needs to stay in sync with test/default.isolate. 78 # This needs to stay in sync with test/default.isolate.
78 "default": [ 79 "default": [
79 "mjsunit", 80 "mjsunit",
80 "cctest", 81 "cctest",
81 "fuzzer", 82 "fuzzer",
82 "message", 83 "message",
83 "preparser", 84 "preparser",
84 "intl", 85 "intl",
85 "unittests", 86 "unittests",
86 ], 87 ],
87 # This needs to stay in sync with test/optimize_for_size.isolate. 88 # This needs to stay in sync with test/optimize_for_size.isolate.
88 "optimize_for_size": [ 89 "optimize_for_size": [
89 "mjsunit", 90 "mjsunit",
90 "cctest", 91 "cctest",
91 "webkit", 92 "webkit",
93 "inspector",
92 "intl", 94 "intl",
93 ], 95 ],
94 "unittests": [ 96 "unittests": [
95 "unittests", 97 "unittests",
96 ], 98 ],
97 } 99 }
98 100
99 TIMEOUT_DEFAULT = 60 101 TIMEOUT_DEFAULT = 60
100 102
101 VARIANTS = ["default", "turbofan", "ignition_staging"] 103 VARIANTS = ["default", "turbofan", "ignition_staging"]
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 help="Uses executables instrumented for gcov coverage", 250 help="Uses executables instrumented for gcov coverage",
249 default=False, action="store_true") 251 default=False, action="store_true")
250 result.add_option("--command-prefix", 252 result.add_option("--command-prefix",
251 help="Prepended to each shell command used to run a test", 253 help="Prepended to each shell command used to run a test",
252 default="") 254 default="")
253 result.add_option("--download-data", help="Download missing test suite data", 255 result.add_option("--download-data", help="Download missing test suite data",
254 default=False, action="store_true") 256 default=False, action="store_true")
255 result.add_option("--download-data-only", 257 result.add_option("--download-data-only",
256 help="Deprecated", 258 help="Deprecated",
257 default=False, action="store_true") 259 default=False, action="store_true")
260 result.add_option("--enable-inspector",
261 help="Indicates a build with inspector support",
262 default=False, action="store_true")
258 result.add_option("--extra-flags", 263 result.add_option("--extra-flags",
259 help="Additional flags to pass to each test command", 264 help="Additional flags to pass to each test command",
260 default="") 265 default="")
261 result.add_option("--isolates", help="Whether to test isolates", 266 result.add_option("--isolates", help="Whether to test isolates",
262 default=False, action="store_true") 267 default=False, action="store_true")
263 result.add_option("-j", help="The number of parallel tasks to run", 268 result.add_option("-j", help="The number of parallel tasks to run",
264 default=0, type="int") 269 default=0, type="int")
265 result.add_option("-m", "--mode", 270 result.add_option("-m", "--mode",
266 help="The test modes in which to run (comma-separated," 271 help="The test modes in which to run (comma-separated,"
267 " uppercase for ninja and buildbot builds): %s" % MODES.keys (), 272 " uppercase for ninja and buildbot builds): %s" % MODES.keys (),
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 return False 464 return False
460 options.auto_detect = True 465 options.auto_detect = True
461 466
462 options.arch_and_mode = None 467 options.arch_and_mode = None
463 options.arch = build_config["v8_target_cpu"] 468 options.arch = build_config["v8_target_cpu"]
464 if options.arch == 'x86': 469 if options.arch == 'x86':
465 # TODO(machenbach): Transform all to x86 eventually. 470 # TODO(machenbach): Transform all to x86 eventually.
466 options.arch = 'ia32' 471 options.arch = 'ia32'
467 options.asan = build_config["is_asan"] 472 options.asan = build_config["is_asan"]
468 options.dcheck_always_on = build_config["dcheck_always_on"] 473 options.dcheck_always_on = build_config["dcheck_always_on"]
474 options.enable_inspector = build_config["v8_enable_inspector"]
469 options.mode = 'debug' if build_config["is_debug"] else 'release' 475 options.mode = 'debug' if build_config["is_debug"] else 'release'
470 options.msan = build_config["is_msan"] 476 options.msan = build_config["is_msan"]
471 options.no_i18n = not build_config["v8_enable_i18n_support"] 477 options.no_i18n = not build_config["v8_enable_i18n_support"]
472 options.no_snap = not build_config["v8_use_snapshot"] 478 options.no_snap = not build_config["v8_use_snapshot"]
473 options.tsan = build_config["is_tsan"] 479 options.tsan = build_config["is_tsan"]
474 480
475 # Architecture and mode related stuff. 481 # Architecture and mode related stuff.
476 if options.arch_and_mode: 482 if options.arch_and_mode:
477 options.arch_and_mode = [arch_and_mode.split(".") 483 options.arch_and_mode = [arch_and_mode.split(".")
478 for arch_and_mode in options.arch_and_mode.split(",")] 484 for arch_and_mode in options.arch_and_mode.split(",")]
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 print "Unknown %s mode %s" % (name, option) 591 print "Unknown %s mode %s" % (name, option)
586 return False 592 return False
587 return True 593 return True
588 if not CheckTestMode("slow test", options.slow_tests): 594 if not CheckTestMode("slow test", options.slow_tests):
589 return False 595 return False
590 if not CheckTestMode("pass|fail test", options.pass_fail_tests): 596 if not CheckTestMode("pass|fail test", options.pass_fail_tests):
591 return False 597 return False
592 if options.no_i18n: 598 if options.no_i18n:
593 TEST_MAP["bot_default"].remove("intl") 599 TEST_MAP["bot_default"].remove("intl")
594 TEST_MAP["default"].remove("intl") 600 TEST_MAP["default"].remove("intl")
601 if not options.enable_inspector:
602 TEST_MAP["bot_default"].remove("inspector")
603 TEST_MAP["optimize_for_size"].remove("inspector")
595 return True 604 return True
596 605
597 606
598 def ShardTests(tests, options): 607 def ShardTests(tests, options):
599 # Read gtest shard configuration from environment (e.g. set by swarming). 608 # Read gtest shard configuration from environment (e.g. set by swarming).
600 # If none is present, use values passed on the command line. 609 # If none is present, use values passed on the command line.
601 shard_count = int(os.environ.get('GTEST_TOTAL_SHARDS', options.shard_count)) 610 shard_count = int(os.environ.get('GTEST_TOTAL_SHARDS', options.shard_count))
602 shard_run = os.environ.get('GTEST_SHARD_INDEX') 611 shard_run = os.environ.get('GTEST_SHARD_INDEX')
603 if shard_run is not None: 612 if shard_run is not None:
604 # The v8 shard_run starts at 1, while GTEST_SHARD_INDEX starts at 0. 613 # The v8 shard_run starts at 1, while GTEST_SHARD_INDEX starts at 0.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 "--coverage-dir=%s" % options.sancov_dir]) 908 "--coverage-dir=%s" % options.sancov_dir])
900 except: 909 except:
901 print >> sys.stderr, "Error: Merging sancov files failed." 910 print >> sys.stderr, "Error: Merging sancov files failed."
902 exit_code = 1 911 exit_code = 1
903 912
904 return exit_code 913 return exit_code
905 914
906 915
907 if __name__ == "__main__": 916 if __name__ == "__main__":
908 sys.exit(Main()) 917 sys.exit(Main())
OLDNEW
« no previous file with comments | « test/optimize_for_size.isolate ('k') | tools/testrunner/testrunner.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698