diff options
Diffstat (limited to 'test/option-k.py')
-rw-r--r-- | test/option-k.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/option-k.py b/test/option-k.py index e8fead2..4034d83 100644 --- a/test/option-k.py +++ b/test/option-k.py @@ -25,15 +25,18 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os.path +import sys import TestSCons +python = sys.executable + test = TestSCons.TestSCons() test.pass_test() #XXX Short-circuit until this is supported. 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) @@ -45,13 +48,13 @@ 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.Succeed(target = 'bbb.out', source = 'bbb.in') -""") +""" % (python, python)) test.run(arguments = '.') |