OLD | NEW |
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 RemoteRunTest(repo_test_util.RepoTest): | 13 class RemoteTest(repo_test_util.RepoTest): |
14 def test_basic(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 subprocess.check_output([ | 18 subprocess.check_output([ |
19 sys.executable, self._recipe_tool, | 19 sys.executable, self._recipe_tool, |
20 'remote_run', | 20 'remote', |
21 '--repository', repos['a']['root'], | 21 '--repository', repos['a']['root'], |
22 '--', | 22 '--', |
| 23 'run', |
23 'a_recipe', | 24 'a_recipe', |
24 ], stderr=subprocess.STDOUT) | 25 ], stderr=subprocess.STDOUT) |
25 | 26 |
26 | 27 |
27 if __name__ == '__main__': | 28 if __name__ == '__main__': |
28 sys.exit(unittest.main()) | 29 sys.exit(unittest.main()) |
OLD | NEW |