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

Unified Diff: tools/compile_test/compile_test.py

Issue 14813020: Fix compile_test.py for CXX values that contain spaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/compile_test/compile_test.py
diff --git a/tools/compile_test/compile_test.py b/tools/compile_test/compile_test.py
index 79371a1fd05d2e03e098340527fc897faadad54c..bbda4abfe54f327aabede26f400bebd5e1376d82 100755
--- a/tools/compile_test/compile_test.py
+++ b/tools/compile_test/compile_test.py
@@ -30,7 +30,9 @@ def DoMain(argv):
if not options.code:
parser.error('Missing required --code switch.')
- cxx = os.environ.get('CXX', 'g++')
+ # The environment variable might expand to a string with spaces,
+ # e.g. "ccache g++". Convert it to a list suitable for argv.
+ cxx = os.environ.get('CXX', 'g++').split()
tmpdir = tempfile.mkdtemp()
try:
@@ -40,7 +42,7 @@ def DoMain(argv):
o_path = os.path.join(tmpdir, 'test.o')
- cxx_cmdline = [cxx, cxx_path, '-o', o_path]
+ cxx_cmdline = cxx + [cxx_path, '-o', o_path]
if not options.run_linker:
cxx_cmdline.append('-c')
# Pass remaining arguments to the compiler.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698