summaryrefslogtreecommitdiffstats
path: root/test/SWIG/SWIGCOM.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/SWIG/SWIGCOM.py')
-rw-r--r--test/SWIG/SWIGCOM.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/test/SWIG/SWIGCOM.py b/test/SWIG/SWIGCOM.py
index ee3ff64..b2d8da2 100644
--- a/test/SWIG/SWIGCOM.py
+++ b/test/SWIG/SWIGCOM.py
@@ -34,21 +34,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')
env.CFile(target = 'aaa', source = 'aaa.i')
env.CXXFile(target = 'bbb', source = 'bbb.i', SWIGFLAGS='-c++')
""" % locals())
@@ -61,8 +51,6 @@ test.run(arguments = '.')
test.must_match('aaa_wrap.c', "aaa.i\n")
test.must_match('bbb_wrap.cc', "bbb.i\n")
-
-
test.pass_test()
# Local Variables: