diff options
author | Steven Knight <knight@baldmt.com> | 2001-10-17 16:42:21 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-10-17 16:42:21 (GMT) |
commit | 772ede31d7a5aed0c72943be9230313de687e0be (patch) | |
tree | f017114c2e9f7c7b8530f6216401a07b398d4b5f /test/option-j.py | |
parent | 3b884c9421bae33e2c7a204aacc5fdc2d9394423 (diff) | |
download | SCons-772ede31d7a5aed0c72943be9230313de687e0be.zip SCons-772ede31d7a5aed0c72943be9230313de687e0be.tar.gz SCons-772ede31d7a5aed0c72943be9230313de687e0be.tar.bz2 |
Portability fixes for tests on Windows Nt.
Diffstat (limited to 'test/option-j.py')
-rw-r--r-- | test/option-j.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/option-j.py b/test/option-j.py index 80cbcca..3eb0b12 100644 --- a/test/option-j.py +++ b/test/option-j.py @@ -24,10 +24,11 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import TestSCons import string import sys +import TestSCons +python = sys.executable try: import threading @@ -43,7 +44,7 @@ test = TestSCons.TestSCons() test.write('build.py', r""" import time import sys -file = open(sys.argv[1], 'w') +file = open(sys.argv[1], 'wb') file.write(str(time.time()) + '\n') time.sleep(1) file.write(str(time.time())) @@ -52,11 +53,11 @@ file.close() test.write('SConstruct', """ MyBuild = Builder(name = "MyBuild", - action = "python build.py $targets") + action = r'%s build.py $targets') env = Environment(BUILDERS = [MyBuild]) env.MyBuild(target = 'f1', source = 'f1.in') env.MyBuild(target = 'f2', source = 'f2.in') -""") +""" % python) def RunTest(args, extra): """extra is used to make scons rebuild the output file""" |