summaryrefslogtreecommitdiffstats
path: root/test/option-s.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-s.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-s.py')
-rw-r--r--test/option-s.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/option-s.py b/test/option-s.py
index fe13fb7..6791786 100644
--- a/test/option-s.py
+++ b/test/option-s.py
@@ -24,27 +24,29 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import TestSCons
import os.path
import string
import sys
+import TestSCons
+
+python = sys.executable
test = TestSCons.TestSCons()
test.write('build.py', r"""
import sys
-file = open(sys.argv[1], 'w')
+file = open(sys.argv[1], 'wb')
file.write("build.py: %s\n" % sys.argv[1])
file.close()
""")
test.write('SConstruct', """
MyBuild = Builder(name = "MyBuild",
- action = "python build.py $target")
+ action = r'%s build.py $target')
env = Environment(BUILDERS = [MyBuild])
env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
-""")
+""" % python)
test.run(arguments = '-s f1.out f2.out', stdout = "")
test.fail_test(not os.path.exists(test.workpath('f1.out')))