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

Side by Side Diff: scripts/slave/unittests/gatekeeper_ng_test.py

Issue 514813003: Added method for loading of the gatekeeper_trees.json config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Added a test to validate checked-in trees config Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « scripts/slave/gatekeeper_ng_config.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Unit tests for gatekeeper_ng.py. 6 """Unit tests for gatekeeper_ng.py.
7 7
8 This is a basic check that gatekeeper_ng.py can properly interpret builds and 8 This is a basic check that gatekeeper_ng.py can properly interpret builds and
9 close the tree. 9 close the tree.
10 10
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 {'squirrels': ['yay']}) 2725 {'squirrels': ['yay']})
2726 with self.assertRaises(AssertionError): 2726 with self.assertRaises(AssertionError):
2727 self.call_gatekeeper() 2727 self.call_gatekeeper()
2728 2728
2729 # Check that the checked in gatekeeper.json is valid. 2729 # Check that the checked in gatekeeper.json is valid.
2730 def testCheckedInConfigIsValid(self): 2730 def testCheckedInConfigIsValid(self):
2731 sys.argv.extend(['--verify']) 2731 sys.argv.extend(['--verify'])
2732 self.call_gatekeeper( 2732 self.call_gatekeeper(
2733 json=os.path.join(SCRIPT_DIR, os.pardir, 'gatekeeper.json')) 2733 json=os.path.join(SCRIPT_DIR, os.pardir, 'gatekeeper.json'))
2734 2734
2735 def testCheckedInTreeConfigIsValid(self): # pylint: disable=R0201
2736 tree_config = os.path.join(SCRIPT_DIR, os.pardir, 'gatekeeper_trees.json')
2737 gatekeeper_ng_config.load_gatekeeper_tree_config(tree_config)
2738
2735 2739
2736 if __name__ == '__main__': 2740 if __name__ == '__main__':
2737 with utils.print_coverage(include=[__file__]): 2741 with utils.print_coverage(include=[__file__]):
2738 unittest.main() 2742 unittest.main()
OLDNEW
« no previous file with comments | « scripts/slave/gatekeeper_ng_config.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698