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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
594 tests | 594 tests |
595 test_results_server: If specified, upload results json files to test | 595 test_results_server: If specified, upload results json files to test |
596 results server | 596 results server |
597 """ | 597 """ |
598 factory_properties = factory_properties or {} | 598 factory_properties = factory_properties or {} |
599 with_pageheap = factory_properties.get('webkit_pageheap') | 599 with_pageheap = factory_properties.get('webkit_pageheap') |
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 builder_name = factory_properties.get('buildername') |
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' | |
611 result_str = 'gpu results' | 610 result_str = 'gpu results' |
612 test_name = 'webkit_gpu_tests' | 611 test_name = 'webkit_gpu_tests' |
612 builder_name += ' - GPU' | |
613 else: | 613 else: |
614 result_dir_basename = 'layout-test-results' | |
615 result_str = 'results' | 614 result_str = 'results' |
616 test_name = 'webkit_tests' | 615 test_name = 'webkit_tests' |
617 | 616 |
618 pageheap_description = '' | 617 pageheap_description = '' |
619 if with_pageheap: | 618 if with_pageheap: |
620 pageheap_description = ' (--enable-pageheap)' | 619 pageheap_description = ' (--enable-pageheap)' |
621 | 620 |
622 webkit_result_dir = '/'.join(['..', '..', result_dir_basename]) | 621 webkit_result_dir = '/'.join(['..', '..', 'layout-test-results']) |
623 | 622 |
624 cmd = [self._python, self._layout_test_tool, | 623 cmd = [self._python, self._layout_test_tool, |
625 '--target', self._target, | 624 '--target', self._target, |
626 '--build-type', 'v8', | 625 '--build-type', 'v8', |
627 '-o', webkit_result_dir, | 626 '-o', webkit_result_dir, |
628 '--build-dir', self._build_dir, | 627 '--build-dir', self._build_dir, |
629 '--build-number', WithProperties("%(buildnumber)s"), | 628 '--build-number', WithProperties("%(buildnumber)s"), |
630 '--builder-name', WithProperties("%(buildername)s"),] | 629 '--builder-name', builder_name,] |
M-A Ruel
2010/12/15 20:00:12
I'd prefer to keep WithProperties() and just renam
Dirk Pranke
2010/12/15 20:41:19
The problem here is that we're attempting to lever
M-A Ruel
2010/12/15 21:17:02
Let me explain more clearly;
1) Assume you remove
| |
631 | 630 |
632 if layout_part: | 631 if layout_part: |
633 cmd.extend(['--run-part', layout_part]) | 632 cmd.extend(['--run-part', layout_part]) |
634 | 633 |
635 if with_pageheap: | 634 if with_pageheap: |
636 cmd.append('--enable-pageheap') | 635 cmd.append('--enable-pageheap') |
637 | 636 |
638 if test_results_server: | 637 if test_results_server: |
639 cmd.extend(['--test-results-server', test_results_server]) | 638 cmd.extend(['--test-results-server', test_results_server]) |
640 if platform: | 639 if platform: |
641 cmd.extend(['--platform', platform]) | 640 cmd.extend(['--platform', platform]) |
642 | 641 |
643 self.AddTestStep(webkit_test_command.WebKitCommand, | 642 self.AddTestStep(webkit_test_command.WebKitCommand, |
644 test_name=test_name, | 643 test_name=test_name, |
645 test_description=pageheap_description, | 644 test_description=pageheap_description, |
646 test_command=cmd) | 645 test_command=cmd) |
647 | 646 |
648 if archive_results: | 647 if archive_results: |
649 url = '%s/%s/%s' % (self._archive_url, result_dir_basename, | 648 url = '%s/%s/%s' % (self._archive_url, result_dir_basename, |
650 self._identifier) | 649 self._identifier) |
651 | 650 |
652 cmd = [self._python, self._layout_archive_tool, | 651 cmd = [self._python, self._layout_archive_tool, |
653 '--results-dir', webkit_result_dir, | 652 '--results-dir', webkit_result_dir, |
654 '--build-dir', self._build_dir, | 653 '--build-dir', self._build_dir, |
655 '--build-number', WithProperties("%(buildnumber)s"), | 654 '--build-number', WithProperties("%(buildnumber)s"), |
656 '--builder-name', WithProperties("%(buildername)s"),] | 655 '--builder-name', builder_name,] |
657 | 656 |
658 self.AddArchiveStep( | 657 self.AddArchiveStep( |
659 data_description='webkit_tests ' + result_str, | 658 data_description='webkit_tests ' + result_str, |
660 base_url=url, | 659 base_url=url, |
661 link_text='layout test ' + result_str, | 660 link_text='layout test ' + result_str, |
662 command=cmd) | 661 command=cmd) |
663 | 662 |
664 def AddRunCrashHandler(self, build_dir=None, target=None): | 663 def AddRunCrashHandler(self, build_dir=None, target=None): |
665 build_dir = build_dir or self._build_dir | 664 build_dir = build_dir or self._build_dir |
666 target = target or self._target | 665 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, | 733 cmd = [self._python, self._download_and_extract_official_tool, |
735 '--identifier', identifier, | 734 '--identifier', identifier, |
736 # TODO(jrg): for now we are triggered on a timer and always | 735 # TODO(jrg): for now we are triggered on a timer and always |
737 # use the latest build. Instead we should trigger on the | 736 # use the latest build. Instead we should trigger on the |
738 # presence of new build and pass that info down for a | 737 # presence of new build and pass that info down for a |
739 # --build N arg. | 738 # --build N arg. |
740 '--latest'] | 739 '--latest'] |
741 self.AddTestStep(commands.WaterfallLoggingShellCommand, | 740 self.AddTestStep(commands.WaterfallLoggingShellCommand, |
742 'Download and extract official build', cmd, | 741 'Download and extract official build', cmd, |
743 halt_on_failure=True) | 742 halt_on_failure=True) |
OLD | NEW |