OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import glob | 6 import glob |
7 import json | 7 import json |
8 import os | 8 import os |
9 import re | 9 import re |
10 import subprocess | 10 import subprocess |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 for (filename, _, expected_error) in test_data: | 613 for (filename, _, expected_error) in test_data: |
614 actual_error = PRESUBMIT._GetIDLParseError(input_api, filename) | 614 actual_error = PRESUBMIT._GetIDLParseError(input_api, filename) |
615 self.assertTrue(expected_error in str(actual_error), | 615 self.assertTrue(expected_error in str(actual_error), |
616 "'%s' not found in '%s'" % (expected_error, actual_error)) | 616 "'%s' not found in '%s'" % (expected_error, actual_error)) |
617 | 617 |
618 | 618 |
619 class TryServerMasterTest(unittest.TestCase): | 619 class TryServerMasterTest(unittest.TestCase): |
620 def testTryServerMasters(self): | 620 def testTryServerMasters(self): |
621 bots = { | 621 bots = { |
622 'tryserver.chromium.gpu': [ | 622 'tryserver.chromium.gpu': [ |
623 'linux_gpu', | |
624 'linux_gpu_triggered_tests', | |
625 'win_gpu', | 623 'win_gpu', |
626 'win_gpu_triggered_tests', | 624 'win_gpu_triggered_tests', |
627 ], | 625 ], |
628 'tryserver.chromium.mac': [ | 626 'tryserver.chromium.mac': [ |
629 'ios_dbg_simulator', | 627 'ios_dbg_simulator', |
630 'ios_rel_device', | 628 'ios_rel_device', |
631 'ios_rel_device_ninja', | 629 'ios_rel_device_ninja', |
632 'mac_asan', | 630 'mac_asan', |
633 'mac_asan_64', | 631 'mac_asan_64', |
634 'mac_chromium_compile_dbg', | 632 'mac_chromium_compile_dbg', |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 } | 710 } |
713 for master, bots in bots.iteritems(): | 711 for master, bots in bots.iteritems(): |
714 for bot in bots: | 712 for bot in bots: |
715 self.assertEqual(master, PRESUBMIT.GetTryServerMasterForBot(bot), | 713 self.assertEqual(master, PRESUBMIT.GetTryServerMasterForBot(bot), |
716 'bot=%s: expected %s, computed %s' % ( | 714 'bot=%s: expected %s, computed %s' % ( |
717 bot, master, PRESUBMIT.GetTryServerMasterForBot(bot))) | 715 bot, master, PRESUBMIT.GetTryServerMasterForBot(bot))) |
718 | 716 |
719 | 717 |
720 if __name__ == '__main__': | 718 if __name__ == '__main__': |
721 unittest.main() | 719 unittest.main() |
OLD | NEW |