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

Side by Side Diff: unittests/remote_test.py

Issue 2839353003: [recipes.py] move remote arg parsing to its module (Closed)
Patch Set: rebase Created 3 years, 7 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
« recipes.py ('K') | « recipes.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 2016 The LUCI Authors. All rights reserved. 2 # Copyright 2016 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 import subprocess 6 import subprocess
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 import repo_test_util 10 import repo_test_util
11 11
12 12
13 class RemoteTest(repo_test_util.RepoTest): 13 class RemoteTest(repo_test_util.RepoTest):
14 def test_run(self): 14 def test_run(self):
15 repos = self.repo_setup({'a': []}) 15 repos = self.repo_setup({'a': []})
16 self.update_recipe_module(repos['a'], 'mod', {'foo': []}) 16 self.update_recipe_module(repos['a'], 'mod', {'foo': []})
17 self.update_recipe(repos['a'], 'a_recipe', ['mod'], [('mod', 'foo')]) 17 self.update_recipe(repos['a'], 'a_recipe', ['mod'], [('mod', 'foo')])
18 try: 18 try:
19 subprocess.check_output([ 19 subprocess.check_output([
20 sys.executable, self._recipe_tool, 20 sys.executable, self._recipe_tool,
21 '-v', '-v', 'remote', 21 '-v', '-v', 'remote',
22 '--repository', repos['a']['root'], 22 '--repository', repos['a']['root'],
23 '--', 23 '--',
24 'run', 24 'run',
25 'a_recipe', 25 'a_recipe',
26 ], stderr=subprocess.STDOUT) 26 ], stderr=subprocess.STDOUT)
27 except subprocess.CalledProcessError as ex: 27 except subprocess.CalledProcessError as ex:
28 print >> sys.stdout, ex.message 28 print >> sys.stdout, ex.message, ex.output
29 raise 29 raise
30 30
31 31
32 if __name__ == '__main__': 32 if __name__ == '__main__':
33 sys.exit(unittest.main()) 33 sys.exit(unittest.main())
OLDNEW
« recipes.py ('K') | « recipes.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698