Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(690)

Side by Side Diff: buildbot/scripts/master/factory_commands.py

Issue 56079: Add SunSpider and V8 Benchmark perf tests to Buildbot. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « buildbot/perf/generate_perf.sh ('k') | buildbot/scripts/master/master_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Set of utilities to add commands to a buildbot factory.""" 6 """Set of utilities to add commands to a buildbot factory."""
7 7
8 import os 8 import os
9 9
10 from buildbot.steps import shell 10 from buildbot.steps import shell
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 'chromium-rel-jsc': 'xp-release-jsc/memory', 113 'chromium-rel-jsc': 'xp-release-jsc/memory',
114 'chromium-rel-xp-dual': 'xp-release-dual-core/memory', 114 'chromium-rel-xp-dual': 'xp-release-dual-core/memory',
115 'chromium-rel-xp-single': 'xp-release-single-core/memory', 115 'chromium-rel-xp-single': 'xp-release-single-core/memory',
116 'chromium-rel-vista-dual': 'vista-release-dual-core/memory', 116 'chromium-rel-vista-dual': 'vista-release-dual-core/memory',
117 'chromium-rel-vista-single': 'vista-release-single-core/memory', 117 'chromium-rel-vista-single': 'vista-release-single-core/memory',
118 'chromium-rel-xp-dual-v8': 'xp-release-v8-latest/memory', 118 'chromium-rel-xp-dual-v8': 'xp-release-v8-latest/memory',
119 'chromium-rel-mac': 'mac-release/memory', 119 'chromium-rel-mac': 'mac-release/memory',
120 } 120 }
121 } 121 }
122 122
123 # Configuration of SunSpider tests.
124 SUNSPIDER_TEST_MAPPINGS = {
125 'Release': {
126 'chromium-rel-xp': 'xp-release/sunspider',
127 'chromium-rel-jsc': 'xp-release-jsc/sunspider',
128 'chromium-rel-xp-dual': 'xp-release-dual-core/sunspider',
129 'chromium-rel-xp-single': 'xp-release-single-core/sunspider',
130 'chromium-rel-vista-dual': 'vista-release-dual-core/sunspider',
131 'chromium-rel-vista-single': 'vista-release-single-core/sunspider',
132 'chromium-rel-xp-dual-v8': 'xp-release-v8-latest/sunspider',
133 'chromium-rel-mac': 'mac-release/sunspider',
134 }
135 }
136
137 # Configuration of V8 Benchmark tests.
138 V8_BENCHMARK_TEST_MAPPINGS = {
139 'Release': {
140 'chromium-rel-xp': 'xp-release/v8_benchmark',
141 'chromium-rel-jsc': 'xp-release-jsc/v8_benchmark',
142 'chromium-rel-xp-dual': 'xp-release-dual-core/v8_benchmark',
143 'chromium-rel-xp-single': 'xp-release-single-core/v8_benchmark',
144 'chromium-rel-vista-dual': 'vista-release-dual-core/v8_benchmark',
145 'chromium-rel-vista-single': 'vista-release-single-core/v8_benchmark',
146 'chromium-rel-xp-dual-v8': 'xp-release-v8-latest/v8_benchmark',
147 'chromium-rel-mac': 'mac-release/v8_benchmark',
148 }
149 }
150
123 151
124 def __init__(self, factory=None, identifier=None, target=None, 152 def __init__(self, factory=None, identifier=None, target=None,
125 build_dir=None, target_platform=None): 153 build_dir=None, target_platform=None):
126 """Initializes the SlaveCommands class. 154 """Initializes the SlaveCommands class.
127 155
128 Args: 156 Args:
129 factory: Factory to configure 157 factory: Factory to configure
130 identifier: full identifier for this build. Typically the builder name 158 identifier: full identifier for this build. Typically the builder name
131 (e.g., 'chrome-release'). 159 (e.g., 'chrome-release').
132 target: Build configuration, case-sensitive; probably 'Debug' or 160 target: Build configuration, case-sensitive; probably 'Debug' or
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 # Where to point waterfall links for builds and test results. 199 # Where to point waterfall links for builds and test results.
172 self._archive_url = config.Master.archive_url 200 self._archive_url = config.Master.archive_url
173 201
174 # Purify isn't in the script_dir, it's out on its own. 202 # Purify isn't in the script_dir, it's out on its own.
175 self._purify_tool = self.PathJoin('src', 'tools', 'purify', 203 self._purify_tool = self.PathJoin('src', 'tools', 'purify',
176 'chrome_tests.py') 204 'chrome_tests.py')
177 205
178 # Valgrind isn't in the script_dir, it's out on its own. 206 # Valgrind isn't in the script_dir, it's out on its own.
179 self._valgrind_tool = self.PathJoin('src', 'tools', 'valgrind', 207 self._valgrind_tool = self.PathJoin('src', 'tools', 'valgrind',
180 'chrome_tests.sh') 208 'chrome_tests.sh')
181 209
182 # Gears test runner lives in the gears src tree. 210 # Gears test runner lives in the gears src tree.
183 self._gears_test_runner = self.PathJoin('src', 'gears', 'gears', 211 self._gears_test_runner = self.PathJoin('src', 'gears', 'gears',
184 'test', 'runner', 'bootstrap.py') 212 'test', 'runner', 'bootstrap.py')
185 213
186 # Gears working dir. 214 # Gears working dir.
187 self._gears_root = self.PathJoin('build', 'src', 'gears', 'gears') 215 self._gears_root = self.PathJoin('build', 'src', 'gears', 'gears')
188 216
189 # These tools aren't in the script_dir either. 217 # These tools aren't in the script_dir either.
190 # TODO(pamg): For consistency, move them into the script_dir if possible. 218 # TODO(pamg): For consistency, move them into the script_dir if possible.
191 self._check_deps_tool = self.PathJoin('src', 'tools', 'checkdeps', 219 self._check_deps_tool = self.PathJoin('src', 'tools', 'checkdeps',
192 'checkdeps.py') 220 'checkdeps.py')
193 self._debugger_test_tool = self.PathJoin('test', 'debugger', 221 self._debugger_test_tool = self.PathJoin('test', 'debugger',
194 'debugger_unittests.py') 222 'debugger_unittests.py')
195 223
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 chromium_utils.GetGClientCommand(self._target_platform), 256 chromium_utils.GetGClientCommand(self._target_platform),
229 'sync', '--verbose'] 257 'sync', '--verbose']
230 258
231 ####### 259 #######
232 # Generic commands 260 # Generic commands
233 261
234 def GetTestCommand(self, executable, total_shards=None, shard_index=None, 262 def GetTestCommand(self, executable, total_shards=None, shard_index=None,
235 arg_list=None): 263 arg_list=None):
236 """Returns a command list to call the _test_tool on the given executable, 264 """Returns a command list to call the _test_tool on the given executable,
237 passing the arg_list, if any, to that executable under test. 265 passing the arg_list, if any, to that executable under test.
238 266
239 Automatically fix the executable name on Windows by adding '.exe'. 267 Automatically fix the executable name on Windows by adding '.exe'.
240 """ 268 """
241 cmd = [self._python, self._test_tool, 269 cmd = [self._python, self._test_tool,
242 '--target', self._target, 270 '--target', self._target,
243 '--build-dir', self._build_dir] 271 '--build-dir', self._build_dir]
244 272
245 if total_shards and shard_index: 273 if total_shards and shard_index:
246 cmd.extend(['--total-shards', str(total_shards), 274 cmd.extend(['--total-shards', str(total_shards),
247 '--shard-index', str(shard_index)]) 275 '--shard-index', str(shard_index)])
248 276
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 process_log.GraphingLogProcessor) 611 process_log.GraphingLogProcessor)
584 612
585 def GetTabSwitchingTestCommand(self, perf_id, show_results, 613 def GetTabSwitchingTestCommand(self, perf_id, show_results,
586 **kwargs): 614 **kwargs):
587 """Selects the right build step for the specified tab switching test. 615 """Selects the right build step for the specified tab switching test.
588 """ 616 """
589 return self.GetPerfTestCommand(perf_id, show_results, 617 return self.GetPerfTestCommand(perf_id, show_results,
590 self.TAB_SWITCHING_TEST_MAPPINGS, 618 self.TAB_SWITCHING_TEST_MAPPINGS,
591 process_log.GraphingLogProcessor) 619 process_log.GraphingLogProcessor)
592 620
621 def GetSunSpiderTestCommand(self, perf_id, show_results, **kwargs):
622 """Selects the right build step for the specified SunSpider test.
623 """
624 return self.GetPerfTestCommand(perf_id, show_results,
625 self.SUNSPIDER_TEST_MAPPINGS,
626 process_log.GraphingLogProcessor)
627
628 def GetV8BenchmarkTestCommand(self, perf_id, show_results, **kwargs):
629 """Selects the right build step for the specified V8 Benchmark test.
630 """
631 return self.GetPerfTestCommand(perf_id, show_results,
632 self.V8_BENCHMARK_TEST_MAPPINGS,
633 process_log.GraphingLogProcessor)
634
593 def GetPageCyclerCommand(self, test_name, http): 635 def GetPageCyclerCommand(self, test_name, http):
594 """Returns a command list to call the _test_tool on the page_cycler 636 """Returns a command list to call the _test_tool on the page_cycler
595 executable, with the appropriate GTest filter and additional arguments. 637 executable, with the appropriate GTest filter and additional arguments.
596 """ 638 """
597 cmd = [self._python, self._test_tool, 639 cmd = [self._python, self._test_tool,
598 '--target', self._target, 640 '--target', self._target,
599 '--build-dir', self._build_dir] 641 '--build-dir', self._build_dir]
600 if http: 642 if http:
601 test_type = 'Http' 643 test_type = 'Http'
602 cmd.extend(['--with-httpd', self.PathJoin('src', 'data', 'page_cycler')]) 644 cmd.extend(['--with-httpd', self.PathJoin('src', 'data', 'page_cycler')])
603 else: 645 else:
604 test_type = 'File' 646 test_type = 'File'
605 cmd.extend([self.GetExecutableName('page_cycler_tests'), 647 cmd.extend([self.GetExecutableName('page_cycler_tests'),
606 '--gtest_filter=PageCycler*.%s%s' % (test_name, test_type)]) 648 '--gtest_filter=PageCycler*.%s%s' % (test_name, test_type)])
607 return cmd 649 return cmd
608 650
609 def GetDomCheckerTestCommand(self): 651 def GetDomCheckerTestCommand(self):
610 """Returns a command list to call the _test_tool for the DOM checker tests. 652 """Returns a command list to call the _test_tool for the DOM checker tests.
611 653
612 The command list will have the appropriate GTest filter and arguments. 654 The command list will have the appropriate GTest filter and arguments.
613 """ 655 """
614 cmd = [self._python, self._test_tool, 656 cmd = [self._python, self._test_tool,
615 '--target', self._target, 657 '--target', self._target,
616 '--build-dir', self._build_dir] 658 '--build-dir', self._build_dir]
617 659
618 cmd.extend(['--with-httpd', 660 cmd.extend(['--with-httpd',
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 """Adds a step to the factory to run the tab switching test.""" 777 """Adds a step to the factory to run the tab switching test."""
736 c = self.GetTabSwitchingTestCommand(perf_id, show_results) 778 c = self.GetTabSwitchingTestCommand(perf_id, show_results)
737 options = ['--gtest_filter=TabSwitchingUITest.*', '-enable-logging', 779 options = ['--gtest_filter=TabSwitchingUITest.*', '-enable-logging',
738 '-dump-histograms-on-exit'] 780 '-dump-histograms-on-exit']
739 self.AddTestStep(command_class=c, 781 self.AddTestStep(command_class=c,
740 timeout=timeout, 782 timeout=timeout,
741 test_name='tab_switching_test', 783 test_name='tab_switching_test',
742 test_command=self.GetTestCommand('tab_switching_test', 784 test_command=self.GetTestCommand('tab_switching_test',
743 arg_list=options)) 785 arg_list=options))
744 786
787 def AddSunSpiderTests(self, show_results, perf_id=None, timeout=300):
788 """Adds a step to the factory to run the SunSpider test."""
789 c = self.GetSunSpiderTestCommand(perf_id, show_results)
790 options = ['--gtest_filter=SunSpider*.*', '--gtest_print_time',
791 '--run-sunspider']
792 self.AddTestStep(command_class=c,
793 timeout=timeout,
794 test_name='sunspider_test',
795 test_command=self.GetTestCommand('sunspider_test',
796 arg_list=options))
797
798 def AddV8BenchmarkTests(self, show_results, perf_id=None, timeout=300):
799 """Adds a step to the factory to run the SunSpider test."""
800 c = self.GetV8BenchmarkTestCommand(perf_id, show_results)
801 options = ['--gtest_filter=V8Benchmark*.*', '--gtest_print_time',
802 '--run-v8-benchmark']
803 self.AddTestStep(command_class=c,
804 timeout=timeout,
805 test_name='v8_benchmark_test',
806 test_command=self.GetTestCommand('v8_benchmark_test',
807 arg_list=options))
808
745 ####### 809 #######
746 # Chrome tests 810 # Chrome tests
747 811
748 def GetReliabilityCommand(self): 812 def GetReliabilityCommand(self):
749 """Returns a command list to call the _reliability_tool.""" 813 """Returns a command list to call the _reliability_tool."""
750 return [self._depot_tools_python, self._reliability_tool, 814 return [self._depot_tools_python, self._reliability_tool,
751 '--data-dir', self._reliability_data] 815 '--data-dir', self._reliability_data]
752 816
753 def AddReliabilityTests(self, timeout=360): 817 def AddReliabilityTests(self, timeout=360):
754 """Adds a step to the factory to query the reliability testing results. 818 """Adds a step to the factory to query the reliability testing results.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 self.AddArchiveStep( 1125 self.AddArchiveStep(
1062 data_description='webkit_tests results', 1126 data_description='webkit_tests results',
1063 timeout=archive_timeout, 1127 timeout=archive_timeout,
1064 base_url=url, 1128 base_url=url,
1065 link_text='layout test results', 1129 link_text='layout test results',
1066 command=self.GetWebkitArchiveCommand()) 1130 command=self.GetWebkitArchiveCommand())
1067 1131
1068 def AddTestShellTests(self): 1132 def AddTestShellTests(self):
1069 """Adds a step to the factory to run the test_shell_tests.""" 1133 """Adds a step to the factory to run the test_shell_tests."""
1070 self.AddBasicGTestTestStep('test_shell_tests') 1134 self.AddBasicGTestTestStep('test_shell_tests')
1071 1135
1072 def AddGearsMake(self, mode, clean=True): 1136 def AddGearsMake(self, mode, clean=True):
1073 """Adds a step to the factory to build gears using make.""" 1137 """Adds a step to the factory to build gears using make."""
1074 # Making gears from the open source repo requires a lot of setup, 1138 # Making gears from the open source repo requires a lot of setup,
1075 # so to simplify things this helper script is required to be 1139 # so to simplify things this helper script is required to be
1076 # available on the builder. 1140 # available on the builder.
1077 setup_env_and_make = r'c:\make_gears.bat' 1141 setup_env_and_make = r'c:\make_gears.bat'
1078 mode = mode or 'dbg' 1142 mode = mode or 'dbg'
1079 if clean: 1143 if clean:
1080 command_list = ['RD', '/S', '/Q', 'bin-%s' % mode] 1144 command_list = ['RD', '/S', '/Q', 'bin-%s' % mode]
1081 clean_timeout = 60 1145 clean_timeout = 60
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 1197
1134 def AddStageBuildStep(self): 1198 def AddStageBuildStep(self):
1135 """Adds a step to stage the build""" 1199 """Adds a step to stage the build"""
1136 self._factory.addStep(shell.ShellCommand, 1200 self._factory.addStep(shell.ShellCommand,
1137 description='stage_build', 1201 description='stage_build',
1138 timeout=1800, 1202 timeout=1800,
1139 command=[self._python, self._archive_tool, 1203 command=[self._python, self._archive_tool,
1140 '--target', self._target, 1204 '--target', self._target,
1141 '--mode', 'official', 1205 '--mode', 'official',
1142 '--build-dir', self._build_dir]) 1206 '--build-dir', self._build_dir])
OLDNEW
« no previous file with comments | « buildbot/perf/generate_perf.sh ('k') | buildbot/scripts/master/master_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698