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

Side by Side Diff: gm/rebaseline_server/results_test.py

Issue 232103002: rebaseline_server: allow user to specify which builders to process (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: expose to command line 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 Test results.py 9 Test results.py
10 10
11 """ 11 """
12 12
13 # Imports from within Skia 13 # Imports from within Skia
14 import base_unittest 14 import base_unittest
15 import results 15 import results
16 16
17 17
18 class ResultsTest(base_unittest.TestCase): 18 class ResultsTest(base_unittest.TestCase):
19 19
20 def test_ignore_builder(self):
21 """Test _ignore_builder()."""
22 results_obj = results.BaseComparisons()
23 self.assertEqual(results_obj._ignore_builder('SomethingTSAN'), True)
24 self.assertEqual(results_obj._ignore_builder('Something-Trybot'), True)
25 self.assertEqual(results_obj._ignore_builder(
26 'Test-Ubuntu12-ShuttleA-GTX660-x86-Release'), False)
27 results_obj.set_skip_builders_pattern_list(['.*TSAN.*', '.*GTX660.*'])
28 self.assertEqual(results_obj._ignore_builder('SomethingTSAN'), True)
29 self.assertEqual(results_obj._ignore_builder('Something-Trybot'), False)
30 self.assertEqual(results_obj._ignore_builder(
31 'Test-Ubuntu12-ShuttleA-GTX660-x86-Release'), True)
32 results_obj.set_skip_builders_pattern_list(None)
33 self.assertEqual(results_obj._ignore_builder('SomethingTSAN'), False)
34 self.assertEqual(results_obj._ignore_builder('Something-Trybot'), False)
35 self.assertEqual(results_obj._ignore_builder(
36 'Test-Ubuntu12-ShuttleA-GTX660-x86-Release'), False)
37 results_obj.set_match_builders_pattern_list(['.*TSAN'])
38 self.assertEqual(results_obj._ignore_builder('SomethingTSAN'), False)
39 self.assertEqual(results_obj._ignore_builder('Something-Trybot'), True)
40 self.assertEqual(results_obj._ignore_builder(
41 'Test-Ubuntu12-ShuttleA-GTX660-x86-Release'), True)
42
20 def test_combine_subdicts_typical(self): 43 def test_combine_subdicts_typical(self):
21 """Test combine_subdicts() with no merge conflicts. """ 44 """Test combine_subdicts() with no merge conflicts. """
22 input_dict = { 45 input_dict = {
23 "failed" : { 46 "failed" : {
24 "changed.png" : [ "bitmap-64bitMD5", 8891695120562235492 ], 47 "changed.png" : [ "bitmap-64bitMD5", 8891695120562235492 ],
25 }, 48 },
26 "no-comparison" : { 49 "no-comparison" : {
27 "unchanged.png" : [ "bitmap-64bitMD5", 11092453015575919668 ], 50 "unchanged.png" : [ "bitmap-64bitMD5", 11092453015575919668 ],
28 } 51 }
29 } 52 }
(...skipping 19 matching lines...) Expand all
49 actual_output_dict = results.BaseComparisons.combine_subdicts( 72 actual_output_dict = results.BaseComparisons.combine_subdicts(
50 input_dict=input_dict) 73 input_dict=input_dict)
51 74
52 75
53 def main(): 76 def main():
54 base_unittest.main(ResultsTest) 77 base_unittest.main(ResultsTest)
55 78
56 79
57 if __name__ == '__main__': 80 if __name__ == '__main__':
58 main() 81 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698