summaryrefslogtreecommitdiffstats
path: root/test/SWIG/SWIGCOMSTR.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/SWIG/SWIGCOMSTR.py')
-rw-r--r--test/SWIG/SWIGCOMSTR.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/test/SWIG/SWIGCOMSTR.py b/test/SWIG/SWIGCOMSTR.py
index 24db13e..c2c3df3 100644
--- a/test/SWIG/SWIGCOMSTR.py
+++ b/test/SWIG/SWIGCOMSTR.py
@@ -35,21 +35,11 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('myswig.py', """
-import sys
-outfile = open(sys.argv[1], 'wb')
-for f in sys.argv[2:]:
- infile = open(f, 'rb')
- for l in [l for l in infile.readlines() if l != b'/*swig*/\\n']:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
test.write('SConstruct', """
env = Environment(tools=['default', 'swig'],
- SWIGCOM = r'%(_python_)s myswig.py $TARGET $SOURCES',
+ SWIGCOM = r'%(_python_)s mycompile.py swig $TARGET $SOURCES',
SWIGCOMSTR = 'Swigging $TARGET from $SOURCE')
env.CFile(target = 'aaa', source = 'aaa.i')
env.CXXFile(target = 'bbb', source = 'bbb.i', SWIGFLAGS='-c++')
@@ -66,8 +56,6 @@ Swigging bbb_wrap.cc from bbb.i
test.must_match('aaa_wrap.c', "aaa.i\n")
test.must_match('bbb_wrap.cc', "bbb.i\n")
-
-
test.pass_test()
# Local Variables: