| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged |
| 3 # Copyright (C) 2011 Apple Inc. All rights reserved. | 3 # Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 options.skipped = 'default' | 548 options.skipped = 'default' |
| 549 | 549 |
| 550 if not options.total_shards and 'GTEST_TOTAL_SHARDS' in port.host.environ: | 550 if not options.total_shards and 'GTEST_TOTAL_SHARDS' in port.host.environ: |
| 551 options.total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) | 551 options.total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) |
| 552 if not options.shard_index and 'GTEST_SHARD_INDEX' in port.host.environ: | 552 if not options.shard_index and 'GTEST_SHARD_INDEX' in port.host.environ: |
| 553 options.shard_index = int(port.host.environ['GTEST_SHARD_INDEX']) | 553 options.shard_index = int(port.host.environ['GTEST_SHARD_INDEX']) |
| 554 | 554 |
| 555 if not options.seed: | 555 if not options.seed: |
| 556 options.seed = port.host.time() | 556 options.seed = port.host.time() |
| 557 | 557 |
| 558 if not options.image_first_tests: |
| 559 image_first_tests_path = port.host.filesystem.join(port.layout_tests_dir
(), 'ImageFirstTests') |
| 560 if port.host.filesystem.exists(image_first_tests_path): |
| 561 contents = port.host.filesystem.read_text_file(image_first_tests_pat
h) |
| 562 options.image_first_tests.extend(line for line in contents.splitline
s(False) if line) |
| 563 |
| 558 | 564 |
| 559 def _run_tests(port, options, args, printer): | 565 def _run_tests(port, options, args, printer): |
| 560 _set_up_derived_options(port, options, args) | 566 _set_up_derived_options(port, options, args) |
| 561 manager = Manager(port, options, printer) | 567 manager = Manager(port, options, printer) |
| 562 printer.print_config(port.results_directory()) | 568 printer.print_config(port.results_directory()) |
| 563 return manager.run(args) | 569 return manager.run(args) |
| 564 | 570 |
| 565 | 571 |
| 566 def run(port, options, args, logging_stream, stdout): | 572 def run(port, options, args, logging_stream, stdout): |
| 567 logger = logging.getLogger() | 573 logger = logging.getLogger() |
| (...skipping 27 matching lines...) Expand all Loading... |
| 595 _log.debug('\t%s', process) | 601 _log.debug('\t%s', process) |
| 596 | 602 |
| 597 return run_details | 603 return run_details |
| 598 | 604 |
| 599 finally: | 605 finally: |
| 600 printer.cleanup() | 606 printer.cleanup() |
| 601 | 607 |
| 602 if __name__ == '__main__': | 608 if __name__ == '__main__': |
| 603 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) | 609 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) |
| 604 sys.exit(exit_code) | 610 sys.exit(exit_code) |
| OLD | NEW |