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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 return i[:-4] | 173 return i[:-4] |
174 if i.endswith('.dll.lib'): | 174 if i.endswith('.dll.lib'): |
175 # Remove only the suffix .lib, not the .dll! | 175 # Remove only the suffix .lib, not the .dll! |
176 return i[:-4] | 176 return i[:-4] |
177 return i | 177 return i |
178 | 178 |
179 def f(i): | 179 def f(i): |
180 # This script is only for adding new binaries that are created as part of | 180 # This script is only for adding new binaries that are created as part of |
181 # the component build. | 181 # the component build. |
182 ext = os.path.splitext(i)[1] | 182 ext = os.path.splitext(i)[1] |
183 if ext not in ['.dll', '.so', '.dylib']: | 183 if ext not in ['.dll', '.nexe', '.so', '.dylib']: |
184 return False | 184 return False |
185 | 185 |
186 # Check for execute access and strip directories. This gets rid of all the | 186 # Check for execute access and strip directories. This gets rid of all the |
187 # phony rules. | 187 # phony rules. |
188 p = os.path.join(build_dir, i) | 188 p = os.path.join(build_dir, i) |
189 return os.access(p, os.X_OK) and not os.path.isdir(p) | 189 return os.access(p, os.X_OK) and not os.path.isdir(p) |
190 | 190 |
191 return filter(f, map(filter_item, dependencies)) | 191 return filter(f, map(filter_item, dependencies)) |
192 | 192 |
193 | 193 |
(...skipping 105 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 |