Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: tools/isolate_driver.py

Issue 1130523003: Add support for escaped target names in isolate driver (3rd try) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add inclusion of chrome.isolate Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/sync_integration_tests.isolate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate_driver.py
diff --git a/tools/isolate_driver.py b/tools/isolate_driver.py
index 6c9f11886633c1343297e885204e50cbb3560fa2..f51b824cb63e75b58f0f91d1b69dd11dc17b7963 100755
--- a/tools/isolate_driver.py
+++ b/tools/isolate_driver.py
@@ -24,6 +24,7 @@ import json
import logging
import os
import posixpath
+import re
import StringIO
import subprocess
import sys
@@ -141,7 +142,9 @@ 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.
+ # Use a negative lookbehind to not split on '$ '.
+ return filter(using_blacklist, re.split('(?<!\$) ', item)[1:])
def collect_deps(target, build_steps, dependencies_added, rules_seen):
« no previous file with comments | « chrome/sync_integration_tests.isolate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698