OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2012 The LUCI Authors. All rights reserved. | 2 # Copyright 2012 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 """Runs hello_world.py, through hello_world.isolate, remotely on a Swarming | 6 """Runs hello_world.py, through hello_world.isolate, remotely on a Swarming |
7 bot. | 7 bot. |
8 | 8 |
9 It first 'compiles' hello_world.isolate into hello_word.isolated, then requests | 9 It first 'compiles' hello_world.isolate into hello_word.isolated, then requests |
10 via swarming.py to archives, run and collect results for this task. | 10 via swarming.py to archives, run and collect results for this task. |
11 | 11 |
12 It generates example_result.json as a task summary. | 12 It generates example_result.json as a task summary. |
13 """ | 13 """ |
14 | 14 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 print(f.read()) | 56 print(f.read()) |
57 return 0 | 57 return 0 |
58 except subprocess.CalledProcessError as e: | 58 except subprocess.CalledProcessError as e: |
59 return e.returncode | 59 return e.returncode |
60 finally: | 60 finally: |
61 shutil.rmtree(tempdir) | 61 shutil.rmtree(tempdir) |
62 | 62 |
63 | 63 |
64 if __name__ == '__main__': | 64 if __name__ == '__main__': |
65 sys.exit(main()) | 65 sys.exit(main()) |
OLD | NEW |