summaryrefslogtreecommitdiffstats
path: root/test/option-i.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/option-i.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/option-i.py')
-rw-r--r--test/option-i.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/option-i.py b/test/option-i.py
index 3301396..713655c 100644
--- a/test/option-i.py
+++ b/test/option-i.py
@@ -25,13 +25,16 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os.path
+import sys
import TestSCons
+python = sys.executable
+
test = TestSCons.TestSCons()
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)
@@ -43,14 +46,14 @@ 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.Fail(target = 'bbb.1', source = 'bbb.in')
env.Succeed(target = 'bbb.out', source = 'bbb.1')
-""")
+""" % (python, python))
test.run(arguments = 'aaa.1 aaa.out bbb.1 bbb.out',
stderr = 'scons: *** [aaa.1] Error 1\n')