diff options
author | nyquist <nyquist@chromium.org> | 2015-07-10 17:01:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-11 00:01:51 +0000 |
commit | c58992cc880b5bff5813276ee9d20a79be70b31f (patch) | |
tree | 6cf9cc711df951aa3009e885a7725c3c2dd5aaff | |
parent | 1389abf29e75c80041b80dbbf7a2f7e6bb8233fb (diff) | |
download | chromium_src-c58992cc880b5bff5813276ee9d20a79be70b31f.zip chromium_src-c58992cc880b5bff5813276ee9d20a79be70b31f.tar.gz chromium_src-c58992cc880b5bff5813276ee9d20a79be70b31f.tar.bz2 |
Add support for escaped target names in isolate driver (4th try)
Currently the isolate_driver.py which creates the dependency files
used by the isolate system, does a simple split on all spaces when
trying to identify targets.
This can fail if the target name contains a space in the name. In
ninja, spaces are escaped with a $-prefix. An example would be
'Content$ Shell$ Helper.app'.
This CL adds support for such target names and ensures that they
stay as one item. Doing this uncovered a few missing dependencies
and a missing file in some .isolate-files for the component build
on Mac.
1st try: https://codereview.chromium.org/970203003/
1st revert: https://codereview.chromium.org/985753002/
2nd try: https://codereview.chromium.org/1103793002/
2nd revert: https://codereview.chromium.org/1129493003/
3rd try: https://codereview.chromium.org/1130523003/
3rd revert: https://codereview.chromium.org/1131363003/
BUG=462248
Review URL: https://codereview.chromium.org/1221333013
Cr-Commit-Position: refs/heads/master@{#338402}
-rw-r--r-- | chrome/chrome.isolate | 7 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 2 | ||||
-rw-r--r-- | chrome/interactive_ui_tests.isolate | 1 | ||||
-rw-r--r-- | chrome/sync_integration_tests.isolate | 1 | ||||
-rwxr-xr-x | tools/isolate_driver.py | 5 |
5 files changed, 15 insertions, 1 deletions
diff --git a/chrome/chrome.isolate b/chrome/chrome.isolate index 43bc605..8bb6d06 100644 --- a/chrome/chrome.isolate +++ b/chrome/chrome.isolate @@ -73,6 +73,13 @@ ], }, }], + ['OS=="mac" and component=="shared_library"', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/libchrome_main_dll.dylib', + ], + }, + }], ['OS=="mac" and asan==1 and fastbuild==0', { 'variables': { 'files': [ diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 1e65cf7..acd8247 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -3166,6 +3166,7 @@ 'target_name': 'interactive_ui_tests_run', 'type': 'none', 'dependencies': [ + 'chrome', 'interactive_ui_tests', ], 'conditions': [ @@ -3186,6 +3187,7 @@ 'target_name': 'sync_integration_tests_run', 'type': 'none', 'dependencies': [ + 'chrome', 'sync_integration_tests', ], 'conditions': [ diff --git a/chrome/interactive_ui_tests.isolate b/chrome/interactive_ui_tests.isolate index 1a5c74b..c6959fb 100644 --- a/chrome/interactive_ui_tests.isolate +++ b/chrome/interactive_ui_tests.isolate @@ -142,5 +142,6 @@ 'includes': [ '../base/base.isolate', '../gin/v8.isolate', + 'chrome.isolate', ], } diff --git a/chrome/sync_integration_tests.isolate b/chrome/sync_integration_tests.isolate index 0b22cf6..ba6aa6f 100644 --- a/chrome/sync_integration_tests.isolate +++ b/chrome/sync_integration_tests.isolate @@ -112,5 +112,6 @@ '../base/base.isolate', '../gin/v8.isolate', '../third_party/angle/angle.isolate', + 'chrome.isolate', ], } diff --git a/tools/isolate_driver.py b/tools/isolate_driver.py index 6c9f118..f51b824 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): |