| OLD | NEW |
| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ], | 76 ], |
| 77 "unittests": [ | 77 "unittests": [ |
| 78 "unittests", | 78 "unittests", |
| 79 ], | 79 ], |
| 80 } | 80 } |
| 81 | 81 |
| 82 TIMEOUT_DEFAULT = 60 | 82 TIMEOUT_DEFAULT = 60 |
| 83 | 83 |
| 84 VARIANTS = ["default", "stress", "turbofan", "nocrankshaft"] | 84 VARIANTS = ["default", "stress", "turbofan", "nocrankshaft"] |
| 85 | 85 |
| 86 EXHAUSTIVE_VARIANTS = VARIANTS + [ |
| 87 # TODO(machenbach): Add always opt turbo variant. |
| 88 ] |
| 89 |
| 86 DEBUG_FLAGS = ["--nohard-abort", "--nodead-code-elimination", | 90 DEBUG_FLAGS = ["--nohard-abort", "--nodead-code-elimination", |
| 87 "--nofold-constants", "--enable-slow-asserts", | 91 "--nofold-constants", "--enable-slow-asserts", |
| 88 "--debug-code", "--verify-heap"] | 92 "--debug-code", "--verify-heap"] |
| 89 RELEASE_FLAGS = ["--nohard-abort", "--nodead-code-elimination", | 93 RELEASE_FLAGS = ["--nohard-abort", "--nodead-code-elimination", |
| 90 "--nofold-constants"] | 94 "--nofold-constants"] |
| 91 | 95 |
| 92 MODES = { | 96 MODES = { |
| 93 "debug": { | 97 "debug": { |
| 94 "flags": DEBUG_FLAGS, | 98 "flags": DEBUG_FLAGS, |
| 95 "timeout_scalefactor": 4, | 99 "timeout_scalefactor": 4, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 help="Don't sort tests according to duration of last run.", | 250 help="Don't sort tests according to duration of last run.", |
| 247 default=False, dest="no_sorting", action="store_true") | 251 default=False, dest="no_sorting", action="store_true") |
| 248 result.add_option("--no-stress", "--nostress", | 252 result.add_option("--no-stress", "--nostress", |
| 249 help="Don't run crankshaft --always-opt --stress-op test", | 253 help="Don't run crankshaft --always-opt --stress-op test", |
| 250 default=False, dest="no_stress", action="store_true") | 254 default=False, dest="no_stress", action="store_true") |
| 251 result.add_option("--no-variants", "--novariants", | 255 result.add_option("--no-variants", "--novariants", |
| 252 help="Don't run any testing variants", | 256 help="Don't run any testing variants", |
| 253 default=False, dest="no_variants", action="store_true") | 257 default=False, dest="no_variants", action="store_true") |
| 254 result.add_option("--variants", | 258 result.add_option("--variants", |
| 255 help="Comma-separated list of testing variants: %s" % VARIAN
TS) | 259 help="Comma-separated list of testing variants: %s" % VARIAN
TS) |
| 260 result.add_option("--exhaustive-variants", |
| 261 default=False, action="store_true", |
| 262 help="Use exhaustive set of default variants.") |
| 256 result.add_option("--outdir", help="Base directory with compile output", | 263 result.add_option("--outdir", help="Base directory with compile output", |
| 257 default="out") | 264 default="out") |
| 258 result.add_option("--predictable", | 265 result.add_option("--predictable", |
| 259 help="Compare output of several reruns of each test", | 266 help="Compare output of several reruns of each test", |
| 260 default=False, action="store_true") | 267 default=False, action="store_true") |
| 261 result.add_option("-p", "--progress", | 268 result.add_option("-p", "--progress", |
| 262 help=("The style of progress indicator" | 269 help=("The style of progress indicator" |
| 263 " (verbose, dots, color, mono)"), | 270 " (verbose, dots, color, mono)"), |
| 264 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") | 271 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") |
| 265 result.add_option("--quickcheck", default=False, action="store_true", | 272 result.add_option("--quickcheck", default=False, action="store_true", |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 """Convert buildbot build configs to configs understood by the v8 runner. | 337 """Convert buildbot build configs to configs understood by the v8 runner. |
| 331 | 338 |
| 332 V8 configs are always lower case and without the additional _x64 suffix for | 339 V8 configs are always lower case and without the additional _x64 suffix for |
| 333 64 bit builds on windows with ninja. | 340 64 bit builds on windows with ninja. |
| 334 """ | 341 """ |
| 335 mode = config[:-4] if config.endswith('_x64') else config | 342 mode = config[:-4] if config.endswith('_x64') else config |
| 336 return mode.lower() | 343 return mode.lower() |
| 337 | 344 |
| 338 def ProcessOptions(options): | 345 def ProcessOptions(options): |
| 339 global ALL_VARIANTS | 346 global ALL_VARIANTS |
| 347 global EXHAUSTIVE_VARIANTS |
| 340 global VARIANTS | 348 global VARIANTS |
| 341 | 349 |
| 342 # Architecture and mode related stuff. | 350 # Architecture and mode related stuff. |
| 343 if options.arch_and_mode: | 351 if options.arch_and_mode: |
| 344 options.arch_and_mode = [arch_and_mode.split(".") | 352 options.arch_and_mode = [arch_and_mode.split(".") |
| 345 for arch_and_mode in options.arch_and_mode.split(",")] | 353 for arch_and_mode in options.arch_and_mode.split(",")] |
| 346 options.arch = ",".join([tokens[0] for tokens in options.arch_and_mode]) | 354 options.arch = ",".join([tokens[0] for tokens in options.arch_and_mode]) |
| 347 options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode]) | 355 options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode]) |
| 348 options.mode = options.mode.split(",") | 356 options.mode = options.mode.split(",") |
| 349 for mode in options.mode: | 357 for mode in options.mode: |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 if options.gc_stress: | 389 if options.gc_stress: |
| 382 options.extra_flags += GC_STRESS_FLAGS | 390 options.extra_flags += GC_STRESS_FLAGS |
| 383 | 391 |
| 384 if options.asan: | 392 if options.asan: |
| 385 options.extra_flags.append("--invoke-weak-callbacks") | 393 options.extra_flags.append("--invoke-weak-callbacks") |
| 386 options.extra_flags.append("--omit-quit") | 394 options.extra_flags.append("--omit-quit") |
| 387 | 395 |
| 388 if options.novfp3: | 396 if options.novfp3: |
| 389 options.extra_flags.append("--noenable-vfp3") | 397 options.extra_flags.append("--noenable-vfp3") |
| 390 | 398 |
| 399 if options.exhaustive_variants: |
| 400 # This is used on many bots. It includes a larger set of default variants. |
| 401 # Other options for manipulating variants still apply afterwards. |
| 402 VARIANTS = EXHAUSTIVE_VARIANTS |
| 403 |
| 391 if options.msan: | 404 if options.msan: |
| 392 VARIANTS = ["default"] | 405 VARIANTS = ["default"] |
| 393 | 406 |
| 394 if options.tsan: | 407 if options.tsan: |
| 395 VARIANTS = ["default"] | 408 VARIANTS = ["default"] |
| 396 suppressions_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), | 409 suppressions_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), |
| 397 'sanitizers', 'tsan_suppressions.txt') | 410 'sanitizers', 'tsan_suppressions.txt') |
| 398 tsan_options = '%s suppressions=%s' % ( | 411 tsan_options = '%s suppressions=%s' % ( |
| 399 os.environ.get('TSAN_OPTIONS', ''), suppressions_file) | 412 os.environ.get('TSAN_OPTIONS', ''), suppressions_file) |
| 400 os.environ['TSAN_OPTIONS'] = tsan_options | 413 os.environ['TSAN_OPTIONS'] = tsan_options |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 verbose.PrintTestDurations(suites, overall_duration) | 741 verbose.PrintTestDurations(suites, overall_duration) |
| 729 | 742 |
| 730 if num_tests == 0: | 743 if num_tests == 0: |
| 731 print("Warning: no tests were run!") | 744 print("Warning: no tests were run!") |
| 732 | 745 |
| 733 return exit_code | 746 return exit_code |
| 734 | 747 |
| 735 | 748 |
| 736 if __name__ == "__main__": | 749 if __name__ == "__main__": |
| 737 sys.exit(Main()) | 750 sys.exit(Main()) |
| OLD | NEW |