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/Depends.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/Depends.py')
-rw-r--r-- | test/Depends.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/Depends.py b/test/Depends.py index 61ebb0a..03033b1 100644 --- a/test/Depends.py +++ b/test/Depends.py @@ -24,25 +24,28 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import sys import TestSCons +python = sys.executable + test = TestSCons.TestSCons() test.subdir('subdir') test.write('build.py', r""" import sys -contents = open(sys.argv[2], 'r').read() + open(sys.argv[3], 'r').read() -file = open(sys.argv[1], 'w') +contents = open(sys.argv[2], 'rb').read() + open(sys.argv[3], 'rb').read() +file = open(sys.argv[1], 'wb') file.write(contents) file.close() """) test.write('SConstruct', """ Foo = Builder(name = "Foo", - action = "python build.py $target $sources subdir/foo.dep") + action = "%s build.py $target $sources subdir/foo.dep") Bar = Builder(name = "Bar", - action = "python build.py $target $sources subdir/bar.dep") + action = "%s build.py $target $sources subdir/bar.dep") env = Environment(BUILDERS = [Foo, Bar]) env.Depends(target = ['f1.out', 'f2.out'], dependency = 'subdir/foo.dep') env.Depends(target = 'f3.out', dependency = 'subdir/bar.dep') @@ -50,7 +53,7 @@ env.Foo(target = 'f1.out', source = 'f1.in') env.Foo(target = 'f2.out', source = 'f2.in') env.Bar(target = 'f3.out', source = 'f3.in') Conscript('subdir/SConscript') -""") +""" % (python, python)) test.write(['subdir', 'SConscript'], """ env.Depends(target = 'f4.out', dependency = 'bar.dep') |