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/Default.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/Default.py')
-rw-r--r-- | test/Default.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/Default.py b/test/Default.py index 515a9c0..9155660 100644 --- a/test/Default.py +++ b/test/Default.py @@ -25,43 +25,46 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os +import sys import TestSCons +python = sys.executable + test = TestSCons.TestSCons() test.subdir('one', 'two', 'three') test.write('build.py', r""" import sys -contents = open(sys.argv[2], 'r').read() -file = open(sys.argv[1], 'w') +contents = open(sys.argv[2], 'rb').read() +file = open(sys.argv[1], 'wb') file.write(contents) file.close() """) test.write(['one', 'SConstruct'], """ -B = Builder(name = 'B', action = "python ../build.py $target $sources") +B = Builder(name = 'B', action = r'%s ../build.py $target $sources') env = Environment(BUILDERS = [B]) env.B(target = 'foo.out', source = 'foo.in') env.B(target = 'bar.out', source = 'bar.in') Default('foo.out') -""") +""" % python) test.write(['two', 'SConstruct'], """ -B = Builder(name = 'B', action = "python ../build.py $target $sources") +B = Builder(name = 'B', action = r'%s ../build.py $target $sources') env = Environment(BUILDERS = [B]) env.B(target = 'foo.out', source = 'foo.in') env.B(target = 'bar.out', source = 'bar.in') Default('foo.out', 'bar.out') -""") +""" % python) test.write(['three', 'SConstruct'], """ -B = Builder(name = 'B', action = "python ../build.py $target $sources") +B = Builder(name = 'B', action = r'%s ../build.py $target $sources') env = Environment(BUILDERS = [B]) env.B(target = 'foo.out', source = 'foo.in') env.B(target = 'bar.out', source = 'bar.in') Default('foo.out bar.out') -""") +""" % python) for dir in ['one', 'two', 'three']: |