summaryrefslogtreecommitdiffstats
path: root/tools/bisect-perf-regression_test.py
diff options
context:
space:
mode:
authorsimonhatch@chromium.org <simonhatch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 02:20:28 +0000
committersimonhatch@chromium.org <simonhatch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 02:20:28 +0000
commit1a7ff50d897b5f59c44520bc85f9108791ff6001 (patch)
tree65c8d653ff1dd699a8e315b95fb65bb1bf088fdc /tools/bisect-perf-regression_test.py
parented47974fd4fbc104adce7e3639fad0319e209f2a (diff)
downloadchromium_src-1a7ff50d897b5f59c44520bc85f9108791ff6001.zip
chromium_src-1a7ff50d897b5f59c44520bc85f9108791ff6001.tar.gz
chromium_src-1a7ff50d897b5f59c44520bc85f9108791ff6001.tar.bz2
Parse DEPS file manually if execfile fails. Some DEPS files pull in a bunch of libraries, so execfile fails. If it does, we'll manually parse out revisions from the vars section.
NOTRY=true BUG=366392 Bisect could not reproduce a change in the not/valid metric. Confidence in Bisection Results: 0% To reproduce locally: $ echo android-chrome Tested commits: Depot Commit SHA Mean Std. Error State android-chrome 0000000000000000000000000000000000000000 1.00 +-0.00 chromium 0000000000000000000000000000000000000000 0.00 +-0.00 chromium http://src.chromium.org/viewvc/chrome?view=revision&revision=265919 0.00 +-0.00 chromium http://src.chromium.org/viewvc/chrome?view=revision&revision=265917 0.00 +-0.00 chromium http://src.chromium.org/viewvc/chrome?view=revision&revision=265912 0.00 +-0.00 chromium http://src.chromium.org/viewvc/chrome?view=revision&revision=265904 0.00 +-0.00 android-chrome 0000000000000000000000000000000000000000 0.00 +-0.00 Average build time : 0:00:00 Average test time : 0:00:00 WARNINGS: !!! Due to build errors, regression range could not be narrowed down to a single commit. !!! Tests were only set to run once. This may be insufficient to get meaningful results. !!! Confidence is 0%. Try bisecting again on another platform, with increased repeat_count or on a sub-metric that shows the regression more clearly. Review URL: https://codereview.chromium.org/256593004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/bisect-perf-regression_test.py')
-rw-r--r--tools/bisect-perf-regression_test.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/bisect-perf-regression_test.py b/tools/bisect-perf-regression_test.py
index 5d77643..7a50316 100644
--- a/tools/bisect-perf-regression_test.py
+++ b/tools/bisect-perf-regression_test.py
@@ -20,6 +20,37 @@ class BisectPerfRegressionTest(unittest.TestCase):
"""Cleans up the test environment after each test method."""
pass
+ def testParseDEPSStringManually(self):
+ """Tests DEPS parsing."""
+ bisect_options = bisect_perf_module.BisectOptions()
+ bisect_instance = bisect_perf_module.BisectPerformanceMetrics(
+ None, bisect_options)
+
+ deps_file_contents = """
+vars = {
+ 'ffmpeg_hash':
+ '@ac4a9f31fe2610bd146857bbd55d7a260003a888',
+ 'webkit_url':
+ 'https://chromium.googlesource.com/chromium/blink.git',
+ 'git_url':
+ 'https://chromium.googlesource.com',
+ 'webkit_rev':
+ '@e01ac0a267d1017288bc67fa3c366b10469d8a24',
+ 'angle_revision':
+ '74697cf2064c0a2c0d7e1b1b28db439286766a05'
+}"""
+
+ # Should only expect svn/git revisions to come through, and urls to be
+ # filtered out.
+ expected_vars_dict = {
+ 'ffmpeg_hash': '@ac4a9f31fe2610bd146857bbd55d7a260003a888',
+ 'webkit_rev': '@e01ac0a267d1017288bc67fa3c366b10469d8a24',
+ 'angle_revision': '74697cf2064c0a2c0d7e1b1b28db439286766a05'
+ }
+ vars_dict = bisect_instance._ParseRevisionsFromDEPSFileManually(
+ deps_file_contents)
+ self.assertEqual(vars_dict, expected_vars_dict)
+
def testCalculateTruncatedMeanRaisesError(self):
"""CalculateTrunctedMean raises an error when passed an empty list."""
with self.assertRaises(TypeError):