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

Side by Side Diff: tools/auto_bisect/bisect_perf_regression_test.py

Issue 792183003: Make changes to support bisect for android-chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | tools/auto_bisect/bisect_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 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import os 5 import os
6 import re 6 import re
7 import shutil 7 import shutil
8 import sys 8 import sys
9 import unittest 9 import unittest
10 10
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 self.assertEqual( 397 self.assertEqual(
398 23634, source_control.GetCommitPosition(v8_rev, depot_path)) 398 23634, source_control.GetCommitPosition(v8_rev, depot_path))
399 399
400 def testGetCommitPositionForWebKit(self): 400 def testGetCommitPositionForWebKit(self):
401 bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS) 401 bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS)
402 wk_rev = 'a94d028e0f2c77f159b3dac95eb90c3b4cf48c61' 402 wk_rev = 'a94d028e0f2c77f159b3dac95eb90c3b4cf48c61'
403 depot_path = os.path.join(bisect_instance.src_cwd, 'third_party', 'WebKit') 403 depot_path = os.path.join(bisect_instance.src_cwd, 'third_party', 'WebKit')
404 self.assertEqual( 404 self.assertEqual(
405 181660, source_control.GetCommitPosition(wk_rev, depot_path)) 405 181660, source_control.GetCommitPosition(wk_rev, depot_path))
406 406
407 def testGetCommitPositionForSkia(self):
408 bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS)
409 skia_rev = 'a94d028e0f2c77f159b3dac95eb90c3b4cf48c61'
410 depot_path = os.path.join(bisect_instance.src_cwd, 'third_party', 'skia')
411 # Skia doesn't use commit positions, and GetCommitPosition should
412 # return None for repos that don't use commit positions.
413 self.assertIsNone(source_control.GetCommitPosition(skia_rev, depot_path))
414
407 def testUpdateDepsContent(self): 415 def testUpdateDepsContent(self):
408 bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS) 416 bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS)
409 deps_file = 'DEPS' 417 deps_file = 'DEPS'
410 # We are intentionally reading DEPS file contents instead of string literal 418 # We are intentionally reading DEPS file contents instead of string literal
411 # with few lines from DEPS because to check if the format we are expecting 419 # with few lines from DEPS because to check if the format we are expecting
412 # to search is not changed in DEPS content. 420 # to search is not changed in DEPS content.
413 # TODO (prasadv): Add a separate test to validate the DEPS contents with the 421 # TODO (prasadv): Add a separate test to validate the DEPS contents with the
414 # format that bisect script expects. 422 # format that bisect script expects.
415 deps_contents = bisect_perf_regression.ReadStringFromFile(deps_file) 423 deps_contents = bisect_perf_regression.ReadStringFromFile(deps_file)
416 deps_key = 'v8_revision' 424 deps_key = 'v8_revision'
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 ], (None, 0)), 612 ], (None, 0)),
605 ] 613 ]
606 self._SetupRunGitMock(try_cmd) 614 self._SetupRunGitMock(try_cmd)
607 bisect_perf_regression._BuilderTryjob( 615 bisect_perf_regression._BuilderTryjob(
608 git_revision, bot_name, bisect_job_name, patch) 616 git_revision, bot_name, bisect_job_name, patch)
609 617
610 618
611 if __name__ == '__main__': 619 if __name__ == '__main__':
612 unittest.main() 620 unittest.main()
613 621
OLDNEW
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | tools/auto_bisect/bisect_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698