diff options
author | prasadv <prasadv@chromium.org> | 2015-07-16 17:45:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-17 00:46:06 +0000 |
commit | 1d2dd72f60a44cf6e42fe21c7a602c721c81c542 (patch) | |
tree | a67da29f146d4e2fb34966cbd1b6a8d86eb5cd3b /tools/auto_bisect | |
parent | d8ec87b3f93ecf173005fd6020e3f8d3774af128 (diff) | |
download | chromium_src-1d2dd72f60a44cf6e42fe21c7a602c721c81c542.zip chromium_src-1d2dd72f60a44cf6e42fe21c7a602c721c81c542.tar.gz chromium_src-1d2dd72f60a44cf6e42fe21c7a602c721c81c542.tar.bz2 |
Make sure ChromePublic.apk is to run benchmarks for perf bisects, CQ and pert tryjobs..
This change ensures that the test command will use --browser=android-chromium (ChromePublic.apk)
on android platform, benchmarks are not longer uses andorid-chrome-shell (ChromeShell.apk).
BUG=503171
Review URL: https://codereview.chromium.org/1226273003
Cr-Commit-Position: refs/heads/master@{#339190}
Diffstat (limited to 'tools/auto_bisect')
-rwxr-xr-x | tools/auto_bisect/bisect_perf_regression.py | 34 | ||||
-rw-r--r-- | tools/auto_bisect/bisect_perf_regression_test.py | 59 | ||||
-rw-r--r-- | tools/auto_bisect/builder.py | 9 | ||||
-rw-r--r-- | tools/auto_bisect/configs/android.perf_test.sunspider.cfg | 2 | ||||
-rwxr-xr-x | tools/auto_bisect/configs/try.py | 2 |
5 files changed, 9 insertions, 97 deletions
diff --git a/tools/auto_bisect/bisect_perf_regression.py b/tools/auto_bisect/bisect_perf_regression.py index 9539b68..7fc16db 100755 --- a/tools/auto_bisect/bisect_perf_regression.py +++ b/tools/auto_bisect/bisect_perf_regression.py @@ -1238,37 +1238,6 @@ class BisectPerformanceMetrics(object): def _IsBisectModeStandardDeviation(self): return self.opts.bisect_mode in [bisect_utils.BISECT_MODE_STD_DEV] - def GetCompatibleCommand(self, command_to_run, revision, depot): - """Return a possibly modified test command depending on the revision. - - Prior to crrev.com/274857 *only* android-chromium-testshell - Then until crrev.com/276628 *both* (android-chromium-testshell and - android-chrome-shell) work. After that rev 276628 *only* - android-chrome-shell works. The bisect_perf_regression.py script should - handle these cases and set appropriate browser type based on revision. - """ - if self.opts.target_platform in ['android']: - # When its a third_party depot, get the chromium revision. - if depot != 'chromium': - revision = bisect_utils.CheckRunGit( - ['rev-parse', 'HEAD'], cwd=self.src_cwd).strip() - commit_position = source_control.GetCommitPosition(revision, - cwd=self.src_cwd) - if not commit_position: - return command_to_run - cmd_re = re.compile(r'--browser=(?P<browser_type>\S+)') - matches = cmd_re.search(command_to_run) - if bisect_utils.IsStringInt(commit_position) and matches: - cmd_browser = matches.group('browser_type') - if commit_position <= 274857 and cmd_browser == 'android-chrome-shell': - return command_to_run.replace(cmd_browser, - 'android-chromium-testshell') - elif (commit_position >= 276628 and - cmd_browser == 'android-chromium-testshell'): - return command_to_run.replace(cmd_browser, - 'android-chrome-shell') - return command_to_run - def RunPerformanceTestAndParseResults( self, command_to_run, metric, reset_on_first_run=False, upload_on_last_run=False, results_label=None, test_run_multiplier=1, @@ -1542,9 +1511,6 @@ class BisectPerformanceMetrics(object): BUILD_RESULT_FAIL) after_build_time = time.time() - # Possibly alter the command. - command = self.GetCompatibleCommand(command, revision, depot) - # Run the command and get the results. results = self.RunPerformanceTestAndParseResults( command, metric, test_run_multiplier=test_run_multiplier) diff --git a/tools/auto_bisect/bisect_perf_regression_test.py b/tools/auto_bisect/bisect_perf_regression_test.py index 6d96d81..15c6833 100644 --- a/tools/auto_bisect/bisect_perf_regression_test.py +++ b/tools/auto_bisect/bisect_perf_regression_test.py @@ -285,65 +285,6 @@ class BisectPerfRegressionTest(unittest.TestCase): self._AssertParseResult([], '{}kb') self._AssertParseResult([], '{XYZ}kb') - def _AssertCompatibleCommand( - self, expected_command, original_command, revision, target_platform): - """Tests the modification of the command that might be done. - - This modification to the command is done in order to get a Telemetry - command that works; before some revisions, the browser name that Telemetry - expects is different in some cases, but we want it to work anyway. - - Specifically, only for android: - After r276628, only android-chrome-shell works. - Prior to r274857, only android-chromium-testshell works. - In the range [274857, 276628], both work. - """ - bisect_options = bisect_perf_regression.BisectOptions() - bisect_options.output_buildbot_annotations = None - bisect_instance = bisect_perf_regression.BisectPerformanceMetrics( - bisect_options, os.getcwd()) - bisect_instance.opts.target_platform = target_platform - git_revision = source_control.ResolveToRevision( - revision, 'chromium', bisect_utils.DEPOT_DEPS_NAME, 100) - depot = 'chromium' - command = bisect_instance.GetCompatibleCommand( - original_command, git_revision, depot) - self.assertEqual(expected_command, command) - - def testGetCompatibleCommand_ChangeToTestShell(self): - # For revisions <= r274857, only android-chromium-testshell is used. - self._AssertCompatibleCommand( - 'tools/perf/run_benchmark -v --browser=android-chromium-testshell foo', - 'tools/perf/run_benchmark -v --browser=android-chrome-shell foo', - 274857, 'android') - - def testGetCompatibleCommand_ChangeToShell(self): - # For revisions >= r276728, only android-chrome-shell can be used. - self._AssertCompatibleCommand( - 'tools/perf/run_benchmark -v --browser=android-chrome-shell foo', - 'tools/perf/run_benchmark -v --browser=android-chromium-testshell foo', - 276628, 'android') - - def testGetCompatibleCommand_NoChange(self): - # For revisions < r276728, android-chromium-testshell can be used. - self._AssertCompatibleCommand( - 'tools/perf/run_benchmark -v --browser=android-chromium-testshell foo', - 'tools/perf/run_benchmark -v --browser=android-chromium-testshell foo', - 274858, 'android') - # For revisions > r274857, android-chrome-shell can be used. - self._AssertCompatibleCommand( - 'tools/perf/run_benchmark -v --browser=android-chrome-shell foo', - 'tools/perf/run_benchmark -v --browser=android-chrome-shell foo', - 274858, 'android') - - def testGetCompatibleCommand_NonAndroidPlatform(self): - # In most cases, there's no need to change Telemetry command. - # For revisions >= r276728, only android-chrome-shell can be used. - self._AssertCompatibleCommand( - 'tools/perf/run_benchmark -v --browser=release foo', - 'tools/perf/run_benchmark -v --browser=release foo', - 276628, 'chromium') - # This method doesn't reference self; it fails if an error is thrown. # pylint: disable=R0201 def testDryRun(self): diff --git a/tools/auto_bisect/builder.py b/tools/auto_bisect/builder.py index 9a93089..97b01f7 100644 --- a/tools/auto_bisect/builder.py +++ b/tools/auto_bisect/builder.py @@ -145,10 +145,17 @@ class AndroidBuilder(Builder): # TODO(qyearsley): Make this a class method and verify that it works with # a unit test. + # TODO (prasadv): Remove android-chrome-shell target once we confirm there are + # no pending bisect jobs with this in command. # pylint: disable=R0201 def _GetTargets(self): """Returns a list of build targets.""" - return ['chrome_shell_apk', 'cc_perftests_apk', 'android_tools'] + return [ + 'chrome_public_apk', + 'chrome_shell_apk', + 'cc_perftests_apk', + 'android_tools' + ] def Build(self, depot, opts): """Builds the android content shell and other necessary tools. diff --git a/tools/auto_bisect/configs/android.perf_test.sunspider.cfg b/tools/auto_bisect/configs/android.perf_test.sunspider.cfg index 16c0ece..87238fc 100644 --- a/tools/auto_bisect/configs/android.perf_test.sunspider.cfg +++ b/tools/auto_bisect/configs/android.perf_test.sunspider.cfg @@ -2,7 +2,7 @@ # http://build.chromium.org/p/tryserver.chromium.perf/builders/linux_perf_bisect/builds/689 config = { - 'command': 'tools/perf/run_benchmark -v --browser=android-chrome-shell sunspider', + 'command': 'tools/perf/run_benchmark -v --browser=android-chromium sunspider', "max_time_minutes": "10", "repeat_count": "1", "truncate_percent": "0" diff --git a/tools/auto_bisect/configs/try.py b/tools/auto_bisect/configs/try.py index 0e2dd8d..e34593f 100755 --- a/tools/auto_bisect/configs/try.py +++ b/tools/auto_bisect/configs/try.py @@ -33,11 +33,9 @@ PLATFORM_BOT_MAP = { 'win': ['win_perf_bisect', 'win_8_perf_bisect', 'win_xp_perf_bisect'], 'winx64': ['win_x64_perf_bisect'], 'android': [ - 'android_gn_perf_bisect', 'android_nexus4_perf_bisect', 'android_nexus5_perf_bisect', 'android_nexus7_perf_bisect', - 'android_nexus10_perf_bisect', ], } SVN_URL = 'svn://svn.chromium.org/chrome-try/try-perf' |