summaryrefslogtreecommitdiff
path: root/test/Java/JARCOMSTR.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-10-03 02:08:04 -0400
committerWilliam Blevins <wblevins001@gmail.com>2016-10-03 02:08:04 -0400
commit19a22ecca5a72d9f78c0bc8672e5bbe6f11e65c8 (patch)
tree22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/Java/JARCOMSTR.py
parentfd8260b1ea1ec158bcabc8030d3a47eadf7c1255 (diff)
downloadscons-19a22ecca5a72d9f78c0bc8672e5bbe6f11e65c8.tar.gz
Moved common my<xxx>.py functions to global fixture and resolve byte/str.
Diffstat (limited to 'test/Java/JARCOMSTR.py')
-rw-r--r--test/Java/JARCOMSTR.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/test/Java/JARCOMSTR.py b/test/Java/JARCOMSTR.py
index 069587fe..4bdc45b5 100644
--- a/test/Java/JARCOMSTR.py
+++ b/test/Java/JARCOMSTR.py
@@ -35,21 +35,11 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('myjar.py', r"""
-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 != '/*jar*/\n']:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
test.write('SConstruct', """
env = Environment(TOOLS = ['default', 'jar'],
- JARCOM = r'%(_python_)s myjar.py $TARGET $SOURCES',
+ JARCOM = r'%(_python_)s mycompile.py jar $TARGET $SOURCES',
JARCOMSTR = "Jar'ing up $TARGET from $SOURCES")
env.Jar(target = 'test1', source = ['file1.in', 'file2.in', 'file3.in'])
""" % locals())
@@ -64,8 +54,6 @@ Jar'ing up test1.jar from file1.in file2.in file3.in
test.must_match('test1.jar', "file1.in\nfile2.in\nfile3.in\n")
-
-
test.pass_test()
# Local Variables: