summaryrefslogtreecommitdiffstats
path: root/test/scan-once.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-01-27 06:35:04 (GMT)
committerSteven Knight <knight@baldmt.com>2004-01-27 06:35:04 (GMT)
commit337d309e434809058ceb356b40f7415d7c07cc09 (patch)
treefaf09e444cbecbeafdc012c1e686a394c6eb156c /test/scan-once.py
parent4e3b37959a38511c32b997a9c60efac699e5a635 (diff)
downloadSCons-337d309e434809058ceb356b40f7415d7c07cc09.zip
SCons-337d309e434809058ceb356b40f7415d7c07cc09.tar.gz
SCons-337d309e434809058ceb356b40f7415d7c07cc09.tar.bz2
Accomodate white space in path names when running tests.
Diffstat (limited to 'test/scan-once.py')
-rw-r--r--test/scan-once.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/scan-once.py b/test/scan-once.py
index cf08f5e..cfc4a25 100644
--- a/test/scan-once.py
+++ b/test/scan-once.py
@@ -337,8 +337,16 @@ Mylib.ExportLib(env, lib_fullname)
#cmd_generated = "cd %s ; sh MAKE-HEADER.sh" % Dir(".")
#cmd_justlib = "cd %s ; make" % Dir(".")
-cmd_generated = "%s $SOURCE" % (sys.executable,)
-cmd_justlib = "%s %s -C ${SOURCES[0].dir}" % (sys.executable, sys.argv[0])
+_ws = re.compile('\s')
+
+def escape(s):
+ if _ws.search(s):
+ s = '"' + s + '"'
+ return s
+
+cmd_generated = "%s $SOURCE" % (escape(sys.executable),)
+cmd_justlib = "%s %s -C ${SOURCES[0].dir}" % ((sys.executable),
+ escape(sys.argv[0]))
##### Deps appear correct ... but wacky scanning?
# Why?