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

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

Issue 141653008: Add infrastructure for skipping tests in GC stress mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tools/run-deopt-fuzzer.py ('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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 VARIANTS = ["default", "stress", "nocrankshaft"] 62 VARIANTS = ["default", "stress", "nocrankshaft"]
63 63
64 MODE_FLAGS = { 64 MODE_FLAGS = {
65 "debug" : ["--nobreak-on-abort", "--nodead-code-elimination", 65 "debug" : ["--nobreak-on-abort", "--nodead-code-elimination",
66 "--nofold-constants", "--enable-slow-asserts", 66 "--nofold-constants", "--enable-slow-asserts",
67 "--debug-code", "--verify-heap"], 67 "--debug-code", "--verify-heap"],
68 "release" : ["--nobreak-on-abort", "--nodead-code-elimination", 68 "release" : ["--nobreak-on-abort", "--nodead-code-elimination",
69 "--nofold-constants"]} 69 "--nofold-constants"]}
70 70
71 GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction",
72 "--concurrent-recompilation-queue-length=64",
73 "--concurrent-recompilation-delay=500",
74 "--concurrent-recompilation"]
75
71 SUPPORTED_ARCHS = ["android_arm", 76 SUPPORTED_ARCHS = ["android_arm",
72 "android_ia32", 77 "android_ia32",
73 "arm", 78 "arm",
74 "ia32", 79 "ia32",
75 "mipsel", 80 "mipsel",
76 "nacl_ia32", 81 "nacl_ia32",
77 "nacl_x64", 82 "nacl_x64",
78 "x64"] 83 "x64"]
79 # Double the timeout for these: 84 # Double the timeout for these:
80 SLOW_ARCHS = ["android_arm", 85 SLOW_ARCHS = ["android_arm",
(...skipping 20 matching lines...) Expand all
101 default=False, action="store_true") 106 default=False, action="store_true")
102 result.add_option("--flaky-tests", 107 result.add_option("--flaky-tests",
103 help="Regard tests marked as flaky (run|skip|dontcare)", 108 help="Regard tests marked as flaky (run|skip|dontcare)",
104 default="dontcare") 109 default="dontcare")
105 result.add_option("--slow-tests", 110 result.add_option("--slow-tests",
106 help="Regard slow tests (run|skip|dontcare)", 111 help="Regard slow tests (run|skip|dontcare)",
107 default="dontcare") 112 default="dontcare")
108 result.add_option("--pass-fail-tests", 113 result.add_option("--pass-fail-tests",
109 help="Regard pass|fail tests (run|skip|dontcare)", 114 help="Regard pass|fail tests (run|skip|dontcare)",
110 default="dontcare") 115 default="dontcare")
116 result.add_option("--gc-stress",
117 help="Switch on GC stress mode",
118 default=False, action="store_true")
111 result.add_option("--command-prefix", 119 result.add_option("--command-prefix",
112 help="Prepended to each shell command used to run a test", 120 help="Prepended to each shell command used to run a test",
113 default="") 121 default="")
114 result.add_option("--download-data", help="Download missing test suite data", 122 result.add_option("--download-data", help="Download missing test suite data",
115 default=False, action="store_true") 123 default=False, action="store_true")
116 result.add_option("--extra-flags", 124 result.add_option("--extra-flags",
117 help="Additional flags to pass to each test command", 125 help="Additional flags to pass to each test command",
118 default="") 126 default="")
119 result.add_option("--isolates", help="Whether to test isolates", 127 result.add_option("--isolates", help="Whether to test isolates",
120 default=False, action="store_true") 128 default=False, action="store_true")
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if options.buildbot: 221 if options.buildbot:
214 # Buildbots run presubmit tests as a separate step. 222 # Buildbots run presubmit tests as a separate step.
215 options.no_presubmit = True 223 options.no_presubmit = True
216 options.no_network = True 224 options.no_network = True
217 if options.command_prefix: 225 if options.command_prefix:
218 print("Specifying --command-prefix disables network distribution, " 226 print("Specifying --command-prefix disables network distribution, "
219 "running tests locally.") 227 "running tests locally.")
220 options.no_network = True 228 options.no_network = True
221 options.command_prefix = shlex.split(options.command_prefix) 229 options.command_prefix = shlex.split(options.command_prefix)
222 options.extra_flags = shlex.split(options.extra_flags) 230 options.extra_flags = shlex.split(options.extra_flags)
231
232 if options.gc_stress:
233 options.extra_flags += GC_STRESS_FLAGS
234
223 if options.j == 0: 235 if options.j == 0:
224 options.j = multiprocessing.cpu_count() 236 options.j = multiprocessing.cpu_count()
225 237
226 def excl(*args): 238 def excl(*args):
227 """Returns true if zero or one of multiple arguments are true.""" 239 """Returns true if zero or one of multiple arguments are true."""
228 return reduce(lambda x, y: x + y, args) <= 1 240 return reduce(lambda x, y: x + y, args) <= 1
229 241
230 if not excl(options.no_stress, options.stress_only, options.no_variants, 242 if not excl(options.no_stress, options.stress_only, options.no_variants,
231 bool(options.variants), options.quickcheck): 243 bool(options.variants), options.quickcheck):
232 print("Use only one of --no-stress, --stress-only, --no-variants, " 244 print("Use only one of --no-stress, --stress-only, --no-variants, "
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 timeout *= TIMEOUT_SCALEFACTOR[mode] 378 timeout *= TIMEOUT_SCALEFACTOR[mode]
367 ctx = context.Context(arch, mode, shell_dir, 379 ctx = context.Context(arch, mode, shell_dir,
368 mode_flags, options.verbose, 380 mode_flags, options.verbose,
369 timeout, options.isolates, 381 timeout, options.isolates,
370 options.command_prefix, 382 options.command_prefix,
371 options.extra_flags, 383 options.extra_flags,
372 options.no_i18n) 384 options.no_i18n)
373 385
374 # Find available test suites and read test cases from them. 386 # Find available test suites and read test cases from them.
375 variables = { 387 variables = {
388 "arch": arch,
389 "deopt_fuzzer": False,
390 "gc_stress": options.gc_stress,
391 "isolates": options.isolates,
376 "mode": mode, 392 "mode": mode,
377 "arch": arch, 393 "no_i18n": options.no_i18n,
378 "system": utils.GuessOS(), 394 "system": utils.GuessOS(),
379 "isolates": options.isolates,
380 "deopt_fuzzer": False,
381 "no_i18n": options.no_i18n,
382 } 395 }
383 all_tests = [] 396 all_tests = []
384 num_tests = 0 397 num_tests = 0
385 test_id = 0 398 test_id = 0
386 for s in suites: 399 for s in suites:
387 s.ReadStatusFile(variables) 400 s.ReadStatusFile(variables)
388 s.ReadTestCases(ctx) 401 s.ReadTestCases(ctx)
389 if len(args) > 0: 402 if len(args) > 0:
390 s.FilterTestCasesByArgs(args) 403 s.FilterTestCasesByArgs(args)
391 all_tests += s.tests 404 all_tests += s.tests
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 except KeyboardInterrupt: 467 except KeyboardInterrupt:
455 raise 468 raise
456 469
457 if options.time: 470 if options.time:
458 verbose.PrintTestDurations(suites, overall_duration) 471 verbose.PrintTestDurations(suites, overall_duration)
459 return exit_code 472 return exit_code
460 473
461 474
462 if __name__ == "__main__": 475 if __name__ == "__main__":
463 sys.exit(Main()) 476 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/run-deopt-fuzzer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698