Chromium Code Reviews| Index: tools/isolate_driver.py |
| diff --git a/tools/isolate_driver.py b/tools/isolate_driver.py |
| index 6c9f11886633c1343297e885204e50cbb3560fa2..ad521d6a0b3886dd5e0634557fd092270d9d9565 100755 |
| --- a/tools/isolate_driver.py |
| +++ b/tools/isolate_driver.py |
| @@ -28,6 +28,7 @@ import StringIO |
| import subprocess |
| import sys |
| import time |
| +import uuid |
| TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) |
| SWARMING_CLIENT_DIR = os.path.join(TOOLS_DIR, 'swarming_client') |
| @@ -141,7 +142,16 @@ def raw_build_to_deps(item): |
| # TODO(maruel): Use a whitelist instead? .stamp, .so.TOC, .dylib.TOC, |
| # .dll.lib, .exe and empty. |
| # The first item is the build rule, e.g. 'link', 'cxx', 'phony', etc. |
| - return filter(using_blacklist, item.split(' ')[1:]) |
| + |
| + # In ninja build files, spaces in targets are escaped with a $-prefix. |
| + # Create a random UUID to use as a replacement for '$ ' and use it while |
| + # splitting the item variable on ' '. When the split has been done, iterate |
| + # over all items, and replace the random variable back to the original. |
| + rand = str(uuid.uuid4()) |
|
Avi (use Gerrit)
2015/03/03 20:20:30
Rather than uuids, can you pick something simple t
nyquist
2015/03/04 02:06:22
Done.
|
| + items_no_space = item.replace('$ ', rand).split(' ')[1:] |
| + items = [it.replace(rand, '$ ') for it in items_no_space] |
| + |
| + return filter(using_blacklist, items) |
| def collect_deps(target, build_steps, dependencies_added, rules_seen): |