| OLD | NEW | 
|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 """Adaptor script called through build/isolate.gypi. | 6 """Adaptor script called through build/isolate.gypi. | 
| 7 | 7 | 
| 8 Creates a wrapping .isolate which 'includes' the original one, that can be | 8 Creates a wrapping .isolate which 'includes' the original one, that can be | 
| 9 consumed by tools/swarming_client/isolate.py. Path variables are determined | 9 consumed by tools/swarming_client/isolate.py. Path variables are determined | 
| 10 based on the current working directory. The relative_cwd in the .isolated file | 10 based on the current working directory. The relative_cwd in the .isolated file | 
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 230   logging.debug( | 230   logging.debug( | 
| 231       'Binary dependencies:%s', ''.join('\n  ' + i for i in binary_deps)) | 231       'Binary dependencies:%s', ''.join('\n  ' + i for i in binary_deps)) | 
| 232 | 232 | 
| 233   # Now do actual wrapping .isolate. | 233   # Now do actual wrapping .isolate. | 
| 234   isolate_dict = { | 234   isolate_dict = { | 
| 235     'includes': [ | 235     'includes': [ | 
| 236       posixpath.join(isolate_relpath, isolate), | 236       posixpath.join(isolate_relpath, isolate), | 
| 237     ], | 237     ], | 
| 238     'variables': { | 238     'variables': { | 
| 239       # Will look like ['<(PRODUCT_DIR)/lib/flibuser_prefs.so']. | 239       # Will look like ['<(PRODUCT_DIR)/lib/flibuser_prefs.so']. | 
| 240       isolate_format.KEY_TRACKED: sorted( | 240       'files': sorted( | 
| 241           '<(PRODUCT_DIR)/%s' % i.replace(os.path.sep, '/') | 241           '<(PRODUCT_DIR)/%s' % i.replace(os.path.sep, '/') | 
| 242           for i in binary_deps), | 242           for i in binary_deps), | 
| 243     }, | 243     }, | 
| 244   } | 244   } | 
| 245   if not os.path.isdir(temp_isolate_dir): | 245   if not os.path.isdir(temp_isolate_dir): | 
| 246     os.makedirs(temp_isolate_dir) | 246     os.makedirs(temp_isolate_dir) | 
| 247   comment = ( | 247   comment = ( | 
| 248       '# Warning: this file was AUTOGENERATED.\n' | 248       '# Warning: this file was AUTOGENERATED.\n' | 
| 249       '# DO NO EDIT.\n') | 249       '# DO NO EDIT.\n') | 
| 250   out = StringIO.StringIO() | 250   out = StringIO.StringIO() | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 299 | 299 | 
| 300   swarming_client = os.path.join(SRC_DIR, 'tools', 'swarming_client') | 300   swarming_client = os.path.join(SRC_DIR, 'tools', 'swarming_client') | 
| 301   sys.stdout.flush() | 301   sys.stdout.flush() | 
| 302   result = subprocess.call( | 302   result = subprocess.call( | 
| 303       [sys.executable, os.path.join(swarming_client, 'isolate.py')] + args) | 303       [sys.executable, os.path.join(swarming_client, 'isolate.py')] + args) | 
| 304   return result | 304   return result | 
| 305 | 305 | 
| 306 | 306 | 
| 307 if __name__ == '__main__': | 307 if __name__ == '__main__': | 
| 308   sys.exit(main()) | 308   sys.exit(main()) | 
| OLD | NEW | 
|---|