summaryrefslogtreecommitdiffstats
path: root/test/Java/RMICCOMSTR.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-10-03 06:08:04 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-10-03 06:08:04 (GMT)
commit5587089a661a520a32c353ea886939cd63a0636a (patch)
tree22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/Java/RMICCOMSTR.py
parent6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff)
downloadSCons-5587089a661a520a32c353ea886939cd63a0636a.zip
SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.gz
SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.bz2
Moved common my<xxx>.py functions to global fixture and resolve byte/str.
Diffstat (limited to 'test/Java/RMICCOMSTR.py')
-rw-r--r--test/Java/RMICCOMSTR.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/test/Java/RMICCOMSTR.py b/test/Java/RMICCOMSTR.py
index 8fe535a..d4d1904 100644
--- a/test/Java/RMICCOMSTR.py
+++ b/test/Java/RMICCOMSTR.py
@@ -39,27 +39,15 @@ test = TestSCons.TestSCons()
test.subdir('src')
-
-
out_file1 = os.path.join('out', 'file1', 'class_Stub.class')
out_file2 = os.path.join('out', 'file2', 'class_Stub.class')
out_file3 = os.path.join('out', 'file3', 'class_Stub.class')
-
-
-test.write('myrmic.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 != '/*rmic*/\n']:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
test.write('SConstruct', """
env = Environment(TOOLS = ['default', 'rmic'],
- RMICCOM = r'%(_python_)s myrmic.py $TARGET $SOURCES',
+ RMICCOM = r'%(_python_)s mycompile.py rmic $TARGET $SOURCES',
RMICCOMSTR = 'Building rmic $TARGET from $SOURCES')
env.RMIC(target = 'out', source = 'file1.class')
env.RMIC(target = 'out', source = 'file2.class')
@@ -80,8 +68,6 @@ test.must_match(out_file1, "file1.class\n")
test.must_match(out_file2, "file2.class\n")
test.must_match(out_file3, "file3.class\n")
-
-
test.pass_test()
# Local Variables: