| 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 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()) | 
| OLD | NEW |