OLD | NEW |
1 # Copyright 2012 The Swarming Authors. All rights reserved. | 1 # Copyright 2012 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed under the Apache License, Version 2.0 that | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # can be found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import datetime | 5 import datetime |
6 import getpass | 6 import getpass |
7 import hashlib | 7 import hashlib |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import subprocess | 10 import subprocess |
11 import sys | 11 import sys |
12 | 12 |
13 | 13 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 'isolate.py', | 116 'isolate.py', |
117 'archive', | 117 'archive', |
118 '--isolate', os.path.join('payload', 'hello_world.isolate'), | 118 '--isolate', os.path.join('payload', 'hello_world.isolate'), |
119 '--isolated', isolated, | 119 '--isolated', isolated, |
120 '--isolate-server', isolate_server, | 120 '--isolate-server', isolate_server, |
121 '--config-variable', 'OS', swarming_os, | 121 '--config-variable', 'OS', swarming_os, |
122 ], verbose) | 122 ], verbose) |
123 with open(isolated, 'rb') as f: | 123 with open(isolated, 'rb') as f: |
124 hashval = hashlib.sha1(f.read()).hexdigest() | 124 hashval = hashlib.sha1(f.read()).hexdigest() |
125 return isolated, hashval | 125 return isolated, hashval |
OLD | NEW |