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 12 matching lines...) Expand all Loading... |
23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 |
31 import logging | 31 import logging |
32 import optparse | 32 import optparse |
33 import os | |
34 import sys | 33 import sys |
35 import traceback | 34 import traceback |
36 | 35 |
37 from webkitpy.common.host import Host | 36 from webkitpy.common.host import Host |
38 from webkitpy.common.system.executive import Executive | 37 from webkitpy.common.system.executive import Executive |
39 from webkitpy.layout_tests.controllers.manager import Manager | 38 from webkitpy.layout_tests.controllers.manager import Manager |
40 from webkitpy.layout_tests.models import test_run_results | 39 from webkitpy.layout_tests.models import test_run_results |
41 from webkitpy.layout_tests.port.factory import configuration_options, platform_o
ptions | 40 from webkitpy.layout_tests.port.factory import configuration_options, platform_o
ptions |
42 from webkitpy.layout_tests.views import buildbot_results | 41 from webkitpy.layout_tests.views import buildbot_results |
43 from webkitpy.layout_tests.views import printing | 42 from webkitpy.layout_tests.views import printing |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 | 535 |
537 if not options.test_list: | 536 if not options.test_list: |
538 options.test_list = [] | 537 options.test_list = [] |
539 options.test_list.append(port.host.filesystem.join(port.layout_tests_dir
(), 'SmokeTests')) | 538 options.test_list.append(port.host.filesystem.join(port.layout_tests_dir
(), 'SmokeTests')) |
540 if not options.skipped: | 539 if not options.skipped: |
541 options.skipped = 'always' | 540 options.skipped = 'always' |
542 | 541 |
543 if not options.skipped: | 542 if not options.skipped: |
544 options.skipped = 'default' | 543 options.skipped = 'default' |
545 | 544 |
546 if 'GTEST_SHARD_INDEX' in os.environ and 'GTEST_TOTAL_SHARDS' in os.environ: | 545 if 'GTEST_SHARD_INDEX' in port.host.environ and 'GTEST_TOTAL_SHARDS' in port
.host.environ: |
547 shard_index = int(os.environ['GTEST_SHARD_INDEX']) + 1 | 546 shard_index = int(port.host.environ['GTEST_SHARD_INDEX']) + 1 |
548 total_shards = int(os.environ['GTEST_TOTAL_SHARDS']) + 1 | 547 total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) + 1 |
549 options.run_part = '{0}:{1}'.format(shard_index, total_shards) | 548 options.run_part = '{0}:{1}'.format(shard_index, total_shards) |
550 | 549 |
551 | 550 |
552 def _run_tests(port, options, args, printer): | 551 def _run_tests(port, options, args, printer): |
553 _set_up_derived_options(port, options, args) | 552 _set_up_derived_options(port, options, args) |
554 manager = Manager(port, options, printer) | 553 manager = Manager(port, options, printer) |
555 printer.print_config(port.results_directory()) | 554 printer.print_config(port.results_directory()) |
556 return manager.run(args) | 555 return manager.run(args) |
557 | 556 |
558 | 557 |
(...skipping 29 matching lines...) Expand all Loading... |
588 _log.debug("\t%s", process) | 587 _log.debug("\t%s", process) |
589 | 588 |
590 return run_details | 589 return run_details |
591 | 590 |
592 finally: | 591 finally: |
593 printer.cleanup() | 592 printer.cleanup() |
594 | 593 |
595 if __name__ == '__main__': | 594 if __name__ == '__main__': |
596 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) | 595 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) |
597 sys.exit(exit_code) | 596 sys.exit(exit_code) |
OLD | NEW |