Chromium Code Reviews| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 global VARIANTS | 183 global VARIANTS |
| 184 | 184 |
| 185 # Architecture and mode related stuff. | 185 # Architecture and mode related stuff. |
| 186 if options.arch_and_mode: | 186 if options.arch_and_mode: |
| 187 options.arch_and_mode = [arch_and_mode.split(".") | 187 options.arch_and_mode = [arch_and_mode.split(".") |
| 188 for arch_and_mode in options.arch_and_mode.split(",")] | 188 for arch_and_mode in options.arch_and_mode.split(",")] |
| 189 options.arch = ",".join([tokens[0] for tokens in options.arch_and_mode]) | 189 options.arch = ",".join([tokens[0] for tokens in options.arch_and_mode]) |
| 190 options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode]) | 190 options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode]) |
| 191 options.mode = options.mode.split(",") | 191 options.mode = options.mode.split(",") |
| 192 for mode in options.mode: | 192 for mode in options.mode: |
| 193 if not mode.lower() in ["debug", "release"]: | 193 if not mode.lower() in ["debug", "release", "optdebug"]: |
| 194 print "Unknown mode %s" % mode | 194 print "Unknown mode %s" % mode |
| 195 return False | 195 return False |
| 196 if options.arch in ["auto", "native"]: | 196 if options.arch in ["auto", "native"]: |
| 197 options.arch = ARCH_GUESS | 197 options.arch = ARCH_GUESS |
| 198 options.arch = options.arch.split(",") | 198 options.arch = options.arch.split(",") |
| 199 for arch in options.arch: | 199 for arch in options.arch: |
| 200 if not arch in SUPPORTED_ARCHS: | 200 if not arch in SUPPORTED_ARCHS: |
| 201 print "Unknown architecture %s" % arch | 201 print "Unknown architecture %s" % arch |
| 202 return False | 202 return False |
| 203 | 203 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 shell_dir = options.shell_dir | 332 shell_dir = options.shell_dir |
| 333 if not shell_dir: | 333 if not shell_dir: |
| 334 if options.buildbot: | 334 if options.buildbot: |
| 335 shell_dir = os.path.join(workspace, options.outdir, mode) | 335 shell_dir = os.path.join(workspace, options.outdir, mode) |
| 336 mode = mode.lower() | 336 mode = mode.lower() |
| 337 else: | 337 else: |
| 338 shell_dir = os.path.join(workspace, options.outdir, | 338 shell_dir = os.path.join(workspace, options.outdir, |
| 339 "%s.%s" % (arch, mode)) | 339 "%s.%s" % (arch, mode)) |
| 340 shell_dir = os.path.relpath(shell_dir) | 340 shell_dir = os.path.relpath(shell_dir) |
| 341 | 341 |
| 342 if mode == "optdebug": | |
| 343 global VARIANTS | |
| 344 mode = "debug" | |
| 345 options.flaky_tests = "skip" | |
| 346 options.slow_tests = "skip" | |
| 347 options.pass_fail_tests = "skip" | |
| 348 VARIANTS=["default", "stress"] | |
| 349 | |
|
Michael Achenbach
2013/12/02 12:52:41
This overwrites the global options dependent on th
Jakob Kummerow
2013/12/02 14:22:56
Done.
| |
| 342 # Populate context object. | 350 # Populate context object. |
| 343 mode_flags = MODE_FLAGS[mode] | 351 mode_flags = MODE_FLAGS[mode] |
| 344 timeout = options.timeout | 352 timeout = options.timeout |
| 345 if timeout == -1: | 353 if timeout == -1: |
| 346 # Simulators are slow, therefore allow a longer default timeout. | 354 # Simulators are slow, therefore allow a longer default timeout. |
| 347 if arch in SLOW_ARCHS: | 355 if arch in SLOW_ARCHS: |
| 348 timeout = 2 * TIMEOUT_DEFAULT; | 356 timeout = 2 * TIMEOUT_DEFAULT; |
| 349 else: | 357 else: |
| 350 timeout = TIMEOUT_DEFAULT; | 358 timeout = TIMEOUT_DEFAULT; |
| 351 | 359 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 except KeyboardInterrupt: | 448 except KeyboardInterrupt: |
| 441 return 1 | 449 return 1 |
| 442 | 450 |
| 443 if options.time: | 451 if options.time: |
| 444 verbose.PrintTestDurations(suites, overall_duration) | 452 verbose.PrintTestDurations(suites, overall_duration) |
| 445 return exit_code | 453 return exit_code |
| 446 | 454 |
| 447 | 455 |
| 448 if __name__ == "__main__": | 456 if __name__ == "__main__": |
| 449 sys.exit(Main()) | 457 sys.exit(Main()) |
| OLD | NEW |