summaryrefslogtreecommitdiffstats
path: root/test/CC.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-17 16:42:21 (GMT)
committerSteven Knight <knight@baldmt.com>2001-10-17 16:42:21 (GMT)
commit772ede31d7a5aed0c72943be9230313de687e0be (patch)
treef017114c2e9f7c7b8530f6216401a07b398d4b5f /test/CC.py
parent3b884c9421bae33e2c7a204aacc5fdc2d9394423 (diff)
downloadSCons-772ede31d7a5aed0c72943be9230313de687e0be.zip
SCons-772ede31d7a5aed0c72943be9230313de687e0be.tar.gz
SCons-772ede31d7a5aed0c72943be9230313de687e0be.tar.bz2
Portability fixes for tests on Windows Nt.
Diffstat (limited to 'test/CC.py')
-rw-r--r--test/CC.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/CC.py b/test/CC.py
index ce18047..5d2985f 100644
--- a/test/CC.py
+++ b/test/CC.py
@@ -25,24 +25,27 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import sys
import TestSCons
+python = sys.executable
+
test = TestSCons.TestSCons()
test.write("ccwrapper.py",
"""import os
import string
import sys
-open('%s', 'w').write("ccwrapper.py\\n")
+open('%s', 'wb').write("ccwrapper.py\\n")
os.system(string.join(["cc"] + sys.argv[1:], " "))
""" % test.workpath('ccwrapper.out'))
test.write('SConstruct', """
foo = Environment()
-bar = Environment(CC = 'python ccwrapper.py')
+bar = Environment(CC = r'%s ccwrapper.py')
foo.Program(target = 'foo', source = 'foo.c')
bar.Program(target = 'bar', source = 'bar.c')
-""")
+""" % python)
test.write('foo.c', """
int