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

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

Issue 2114653002: [test] Remove presubmit logic from test runner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@gn-test1
Patch Set: Rebase Created 4 years, 5 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 | « Makefile ('k') | no next file » | 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 help="Run without test harness of a given suite", 272 help="Run without test harness of a given suite",
273 default=False, action="store_true") 273 default=False, action="store_true")
274 result.add_option("--no-i18n", "--noi18n", 274 result.add_option("--no-i18n", "--noi18n",
275 help="Skip internationalization tests", 275 help="Skip internationalization tests",
276 default=False, action="store_true") 276 default=False, action="store_true")
277 result.add_option("--no-network", "--nonetwork", 277 result.add_option("--no-network", "--nonetwork",
278 help="Don't distribute tests on the network", 278 help="Don't distribute tests on the network",
279 default=(utils.GuessOS() != "linux"), 279 default=(utils.GuessOS() != "linux"),
280 dest="no_network", action="store_true") 280 dest="no_network", action="store_true")
281 result.add_option("--no-presubmit", "--nopresubmit", 281 result.add_option("--no-presubmit", "--nopresubmit",
282 help='Skip presubmit checks', 282 help='Skip presubmit checks (deprecated)',
283 default=False, dest="no_presubmit", action="store_true") 283 default=False, dest="no_presubmit", action="store_true")
284 result.add_option("--no-snap", "--nosnap", 284 result.add_option("--no-snap", "--nosnap",
285 help='Test a build compiled without snapshot.', 285 help='Test a build compiled without snapshot.',
286 default=False, dest="no_snap", action="store_true") 286 default=False, dest="no_snap", action="store_true")
287 result.add_option("--no-sorting", "--nosorting", 287 result.add_option("--no-sorting", "--nosorting",
288 help="Don't sort tests according to duration of last run.", 288 help="Don't sort tests according to duration of last run.",
289 default=False, dest="no_sorting", action="store_true") 289 default=False, dest="no_sorting", action="store_true")
290 result.add_option("--no-stress", "--nostress", 290 result.add_option("--no-stress", "--nostress",
291 help="Don't run crankshaft --always-opt --stress-op test", 291 help="Don't run crankshaft --always-opt --stress-op test",
292 default=False, dest="no_stress", action="store_true") 292 default=False, dest="no_stress", action="store_true")
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 return False 483 return False
484 484
485 # Store the final configuration in arch_and_mode list. Don't overwrite 485 # Store the final configuration in arch_and_mode list. Don't overwrite
486 # predefined arch_and_mode since it is more expressive than arch and mode. 486 # predefined arch_and_mode since it is more expressive than arch and mode.
487 if not options.arch_and_mode: 487 if not options.arch_and_mode:
488 options.arch_and_mode = itertools.product(options.arch, options.mode) 488 options.arch_and_mode = itertools.product(options.arch, options.mode)
489 489
490 # Special processing of other options, sorted alphabetically. 490 # Special processing of other options, sorted alphabetically.
491 491
492 if options.buildbot: 492 if options.buildbot:
493 # Buildbots run presubmit tests as a separate step.
494 options.no_presubmit = True
495 options.no_network = True 493 options.no_network = True
496 if options.download_data_only:
497 options.no_presubmit = True
498 if options.command_prefix: 494 if options.command_prefix:
499 print("Specifying --command-prefix disables network distribution, " 495 print("Specifying --command-prefix disables network distribution, "
500 "running tests locally.") 496 "running tests locally.")
501 options.no_network = True 497 options.no_network = True
502 options.command_prefix = shlex.split(options.command_prefix) 498 options.command_prefix = shlex.split(options.command_prefix)
503 options.extra_flags = shlex.split(options.extra_flags) 499 options.extra_flags = shlex.split(options.extra_flags)
504 500
505 if options.gc_stress: 501 if options.gc_stress:
506 options.extra_flags += GC_STRESS_FLAGS 502 options.extra_flags += GC_STRESS_FLAGS
507 503
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 parser.print_help() 625 parser.print_help()
630 return 1 626 return 1
631 SetupEnvironment(options) 627 SetupEnvironment(options)
632 628
633 if options.swarming: 629 if options.swarming:
634 # Swarming doesn't print how isolated commands are called. Lets make this 630 # Swarming doesn't print how isolated commands are called. Lets make this
635 # less cryptic by printing it ourselves. 631 # less cryptic by printing it ourselves.
636 print ' '.join(sys.argv) 632 print ' '.join(sys.argv)
637 633
638 exit_code = 0 634 exit_code = 0
639 if not options.no_presubmit:
640 print ">>> running presubmit tests"
641 exit_code = subprocess.call(
642 [sys.executable, join(BASE_DIR, "tools", "presubmit.py")])
643 635
644 suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test")) 636 suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test"))
645 637
646 # Use default tests if no test configuration was provided at the cmd line. 638 # Use default tests if no test configuration was provided at the cmd line.
647 if len(args) == 0: 639 if len(args) == 0:
648 args = ["default"] 640 args = ["default"]
649 641
650 # Expand arguments with grouped tests. The args should reflect the list of 642 # Expand arguments with grouped tests. The args should reflect the list of
651 # suites as otherwise filters would break. 643 # suites as otherwise filters would break.
652 def ExpandTestGroups(name): 644 def ExpandTestGroups(name):
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 "--coverage-dir=%s" % options.sancov_dir]) 874 "--coverage-dir=%s" % options.sancov_dir])
883 except: 875 except:
884 print >> sys.stderr, "Error: Merging sancov files failed." 876 print >> sys.stderr, "Error: Merging sancov files failed."
885 exit_code = 1 877 exit_code = 1
886 878
887 return exit_code 879 return exit_code
888 880
889 881
890 if __name__ == "__main__": 882 if __name__ == "__main__":
891 sys.exit(Main()) 883 sys.exit(Main())
OLDNEW
« no previous file with comments | « Makefile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698