summaryrefslogtreecommitdiff
path: root/test/option-k.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-17 16:42:21 +0000
committerSteven Knight <knight@baldmt.com>2001-10-17 16:42:21 +0000
commit772ede31d7a5aed0c72943be9230313de687e0be (patch)
treef017114c2e9f7c7b8530f6216401a07b398d4b5f /test/option-k.py
parent3b884c9421bae33e2c7a204aacc5fdc2d9394423 (diff)
downloadscons-772ede31d7a5aed0c72943be9230313de687e0be.tar.gz
Portability fixes for tests on Windows Nt.
Diffstat (limited to 'test/option-k.py')
-rw-r--r--test/option-k.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/option-k.py b/test/option-k.py
index e8fead23..4034d831 100644
--- a/test/option-k.py
+++ b/test/option-k.py
@@ -25,15 +25,18 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
+import sys
import TestSCons
+python = sys.executable
+
test = TestSCons.TestSCons()
test.pass_test() #XXX Short-circuit until this is supported.
test.write('succeed.py', r"""
import sys
-file = open(sys.argv[1], 'w')
+file = open(sys.argv[1], 'wb')
file.write("succeed.py: %s\n" % sys.argv[1])
file.close()
sys.exit(0)
@@ -45,13 +48,13 @@ sys.exit(1)
""")
test.write('SConstruct', """
-Succeed = Builder(name = "Succeed", action = "python succeed.py $targets")
-Fail = Builder(name = "Fail", action = "python fail.py $targets")
+Succeed = Builder(name = "Succeed", action = r'%s succeed.py $targets')
+Fail = Builder(name = "Fail", action = r'%s fail.py $targets')
env = Environment(BUILDERS = [Succeed, Fail])
env.Fail(target = 'aaa.1', source = 'aaa.in')
env.Succeed(target = 'aaa.out', source = 'aaa.1')
env.Succeed(target = 'bbb.out', source = 'bbb.in')
-""")
+""" % (python, python))
test.run(arguments = '.')