OLD | NEW |
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Set of utilities to add commands to a buildbot factory. | 5 """Set of utilities to add commands to a buildbot factory. |
6 | 6 |
7 This is based on commands.py and adds chromium-specific commands.""" | 7 This is based on commands.py and adds chromium-specific commands.""" |
8 | 8 |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 archive_results = factory_properties.get('archive_webkit_results') | 600 archive_results = factory_properties.get('archive_webkit_results') |
601 layout_part = factory_properties.get('layout_part') | 601 layout_part = factory_properties.get('layout_part') |
602 test_results_server = factory_properties.get('test_results_server') | 602 test_results_server = factory_properties.get('test_results_server') |
603 platform = factory_properties.get('layout_test_platform') | 603 platform = factory_properties.get('layout_test_platform') |
604 | 604 |
605 if gpu: | 605 if gpu: |
606 if platform: | 606 if platform: |
607 platform = platform.replace('chromium', 'chromium-gpu') | 607 platform = platform.replace('chromium', 'chromium-gpu') |
608 else: | 608 else: |
609 platform = 'chromium-gpu' | 609 platform = 'chromium-gpu' |
610 result_dir_basename = 'layout-test-results-gpu' | 610 builder_name = '%(buildername)s - GPU' |
611 result_str = 'gpu results' | 611 result_str = 'gpu results' |
612 test_name = 'webkit_gpu_tests' | 612 test_name = 'webkit_gpu_tests' |
613 else: | 613 else: |
614 result_dir_basename = 'layout-test-results' | 614 builder_name = '%(buildername)' |
615 result_str = 'results' | 615 result_str = 'results' |
616 test_name = 'webkit_tests' | 616 test_name = 'webkit_tests' |
617 | 617 |
618 pageheap_description = '' | 618 pageheap_description = '' |
619 if with_pageheap: | 619 if with_pageheap: |
620 pageheap_description = ' (--enable-pageheap)' | 620 pageheap_description = ' (--enable-pageheap)' |
621 | 621 |
622 webkit_result_dir = '/'.join(['..', '..', result_dir_basename]) | 622 webkit_result_dir = '/'.join(['..', '..', 'layout-test-results']) |
623 | 623 |
624 cmd = [self._python, self._layout_test_tool, | 624 cmd = [self._python, self._layout_test_tool, |
625 '--target', self._target, | 625 '--target', self._target, |
626 '--build-type', 'v8', | 626 '--build-type', 'v8', |
627 '-o', webkit_result_dir, | 627 '-o', webkit_result_dir, |
628 '--build-dir', self._build_dir, | 628 '--build-dir', self._build_dir, |
629 '--build-number', WithProperties("%(buildnumber)s"), | 629 '--build-number', WithProperties("%(buildnumber)s"), |
630 '--builder-name', WithProperties("%(buildername)s"),] | 630 '--builder-name', WithProperties(builder_name),] |
631 | 631 |
632 if layout_part: | 632 if layout_part: |
633 cmd.extend(['--run-part', layout_part]) | 633 cmd.extend(['--run-part', layout_part]) |
634 | 634 |
635 if with_pageheap: | 635 if with_pageheap: |
636 cmd.append('--enable-pageheap') | 636 cmd.append('--enable-pageheap') |
637 | 637 |
638 if test_results_server: | 638 if test_results_server: |
639 cmd.extend(['--test-results-server', test_results_server]) | 639 cmd.extend(['--test-results-server', test_results_server]) |
640 if platform: | 640 if platform: |
641 cmd.extend(['--platform', platform]) | 641 cmd.extend(['--platform', platform]) |
642 | 642 |
643 self.AddTestStep(webkit_test_command.WebKitCommand, | 643 self.AddTestStep(webkit_test_command.WebKitCommand, |
644 test_name=test_name, | 644 test_name=test_name, |
645 test_description=pageheap_description, | 645 test_description=pageheap_description, |
646 test_command=cmd) | 646 test_command=cmd) |
647 | 647 |
648 if archive_results: | 648 if archive_results: |
649 url = '%s/%s/%s' % (self._archive_url, result_dir_basename, | 649 url = '%s/%s/%s' % (self._archive_url, result_dir_basename, |
650 self._identifier) | 650 self._identifier) |
651 | 651 |
652 cmd = [self._python, self._layout_archive_tool, | 652 cmd = [self._python, self._layout_archive_tool, |
653 '--results-dir', webkit_result_dir, | 653 '--results-dir', webkit_result_dir, |
654 '--build-dir', self._build_dir, | 654 '--build-dir', self._build_dir, |
655 '--build-number', WithProperties("%(buildnumber)s"), | 655 '--build-number', WithProperties("%(buildnumber)s"), |
656 '--builder-name', WithProperties("%(buildername)s"),] | 656 '--builder-name', WithProperties(buildername),] |
657 | 657 |
658 self.AddArchiveStep( | 658 self.AddArchiveStep( |
659 data_description='webkit_tests ' + result_str, | 659 data_description='webkit_tests ' + result_str, |
660 base_url=url, | 660 base_url=url, |
661 link_text='layout test ' + result_str, | 661 link_text='layout test ' + result_str, |
662 command=cmd) | 662 command=cmd) |
663 | 663 |
664 def AddRunCrashHandler(self, build_dir=None, target=None): | 664 def AddRunCrashHandler(self, build_dir=None, target=None): |
665 build_dir = build_dir or self._build_dir | 665 build_dir = build_dir or self._build_dir |
666 target = target or self._target | 666 target = target or self._target |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 cmd = [self._python, self._download_and_extract_official_tool, | 734 cmd = [self._python, self._download_and_extract_official_tool, |
735 '--identifier', identifier, | 735 '--identifier', identifier, |
736 # TODO(jrg): for now we are triggered on a timer and always | 736 # TODO(jrg): for now we are triggered on a timer and always |
737 # use the latest build. Instead we should trigger on the | 737 # use the latest build. Instead we should trigger on the |
738 # presence of new build and pass that info down for a | 738 # presence of new build and pass that info down for a |
739 # --build N arg. | 739 # --build N arg. |
740 '--latest'] | 740 '--latest'] |
741 self.AddTestStep(commands.WaterfallLoggingShellCommand, | 741 self.AddTestStep(commands.WaterfallLoggingShellCommand, |
742 'Download and extract official build', cmd, | 742 'Download and extract official build', cmd, |
743 halt_on_failure=True) | 743 halt_on_failure=True) |
OLD | NEW |