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

Unified Diff: tools/bisect-perf-regression_test.py

Issue 256593004: [bisect] - Parse DEPS file manually if execfile fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/bisect-perf-regression.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bisect-perf-regression_test.py
diff --git a/tools/bisect-perf-regression_test.py b/tools/bisect-perf-regression_test.py
index 5d77643d787e54d98f84714348d4055fe05f17a7..7a50316c4520a2bb6ec8486ebd1018a5a6815a33 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):
« no previous file with comments | « tools/bisect-perf-regression.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698