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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 534 |
535 self.assertEqual('No JSON object could be decoded', | 535 self.assertEqual('No JSON object could be decoded', |
536 str(PRESUBMIT._GetJSONParseError(input_api, | 536 str(PRESUBMIT._GetJSONParseError(input_api, |
537 file_with_comments, | 537 file_with_comments, |
538 eat_comments=False))) | 538 eat_comments=False))) |
539 self.assertEqual(None, | 539 self.assertEqual(None, |
540 PRESUBMIT._GetJSONParseError(input_api, | 540 PRESUBMIT._GetJSONParseError(input_api, |
541 file_without_comments, | 541 file_without_comments, |
542 eat_comments=False)) | 542 eat_comments=False)) |
543 | 543 |
544 | |
545 class TryServerMasterTest(unittest.TestCase): | |
546 def testTryServerMasters(self): | |
547 bots = { | |
548 'tryserver.chromium.gpu': [ | |
549 'mac_gpu', | |
550 'mac_gpu_triggered_tests', | |
551 'linux_gpu', | |
552 'linux_gpu_triggered_tests', | |
553 'win_gpu', | |
554 'win_gpu_triggered_tests', | |
555 ], | |
556 'tryserver.chromium.mac': [ | |
557 'ios_dbg_simulator', | |
558 'ios_rel_device', | |
559 'ios_rel_device_ninja', | |
560 'mac_asan', | |
561 'mac_asan_64', | |
562 'mac_chromium_compile_dbg', | |
563 'mac_chromium_compile_rel', | |
564 'mac_chromium_dbg', | |
565 'mac_chromium_rel', | |
566 'mac_nacl_sdk', | |
567 'mac_nacl_sdk_build', | |
568 'mac_rel_naclmore', | |
569 'mac_valgrind', | |
570 'mac_x64_rel', | |
571 'mac_xcodebuild', | |
572 ], | |
573 'tryserver.chromium.linux': [ | |
574 'android_aosp', | |
575 'android_chromium_gn_compile_dbg', | |
576 'android_chromium_gn_compile_rel', | |
577 'android_clang_dbg', | |
578 'android_dbg', | |
579 'android_dbg_recipe', | |
580 'android_dbg_triggered_tests', | |
581 'android_dbg_triggered_tests_recipe', | |
582 'android_fyi_dbg', | |
583 'android_fyi_dbg_triggered_tests', | |
584 'android_rel', | |
585 'android_rel_triggered_tests', | |
586 'android_x86_dbg', | |
587 'blink_android_compile_dbg', | |
588 'blink_android_compile_rel', | |
589 'blink_presubmit', | |
590 'chromium_presubmit', | |
591 'linux_arm_cross_compile', | |
592 'linux_arm_tester', | |
593 'linux_chromeos_asan', | |
594 'linux_chromeos_browser_asan', | |
595 'linux_chromeos_valgrind', | |
596 'linux_chromium_chromeos_clang_dbg', | |
597 'linux_chromium_chromeos_clang_rel', | |
598 'linux_chromium_chromeos_dbg', | |
599 'linux_chromium_chromeos_rel', | |
600 'linux_chromium_clang_dbg', | |
601 'linux_chromium_clang_rel', | |
602 'linux_chromium_compile_dbg', | |
603 'linux_chromium_compile_rel', | |
604 'linux_chromium_dbg', | |
605 'linux_chromium_gn_dbg', | |
606 'linux_chromium_gn_rel', | |
607 'linux_chromium_rel', | |
608 'linux_chromium_trusty32_dbg', | |
609 'linux_chromium_trusty32_rel', | |
610 'linux_chromium_trusty_dbg', | |
611 'linux_chromium_trusty_rel', | |
612 'linux_clang_tsan', | |
613 'linux_ecs_ozone', | |
614 'linux_layout', | |
615 'linux_layout_asan', | |
616 'linux_layout_rel', | |
617 'linux_layout_rel_32', | |
618 'linux_nacl_sdk', | |
619 'linux_nacl_sdk_bionic', | |
620 'linux_nacl_sdk_bionic_build', | |
621 'linux_nacl_sdk_build', | |
622 'linux_redux', | |
623 'linux_rel_naclmore', | |
624 'linux_rel_precise32', | |
625 'linux_valgrind', | |
626 'tools_build_presubmit', | |
627 ], | |
628 'tryserver.chromium.win': [ | |
629 'win8_aura', | |
630 'win8_chromium_dbg', | |
631 'win8_chromium_rel', | |
632 'win_chromium_compile_dbg', | |
633 'win_chromium_compile_rel', | |
634 'win_chromium_dbg', | |
635 'win_chromium_rel', | |
636 'win_chromium_rel', | |
637 'win_chromium_x64_dbg', | |
638 'win_chromium_x64_rel', | |
639 'win_drmemory', | |
640 'win_nacl_sdk', | |
641 'win_nacl_sdk_build', | |
642 'win_rel_naclmore', | |
643 ], | |
644 } | |
645 for master, bots in bots.iteritems(): | |
646 for bot in bots: | |
647 self.assertEqual(master, PRESUBMIT.GetTryServerMasterForBot(bot), | |
648 'bot=%s: expected %s, computed %s' % ( | |
649 bot, master, PRESUBMIT.GetTryServerMasterForBot(bot))) | |
650 | |
651 | |
652 if __name__ == '__main__': | 544 if __name__ == '__main__': |
653 unittest.main() | 545 unittest.main() |
OLD | NEW |