diff options
author | William Blevins <wblevins001@gmail.com> | 2016-10-03 06:08:04 (GMT) |
---|---|---|
committer | William Blevins <wblevins001@gmail.com> | 2016-10-03 06:08:04 (GMT) |
commit | 5587089a661a520a32c353ea886939cd63a0636a (patch) | |
tree | 22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/Java/JAVACCOM.py | |
parent | 6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff) | |
download | SCons-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/JAVACCOM.py')
-rw-r--r-- | test/Java/JAVACCOM.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/test/Java/JAVACCOM.py b/test/Java/JAVACCOM.py index 064feed..0de173d 100644 --- a/test/Java/JAVACCOM.py +++ b/test/Java/JAVACCOM.py @@ -36,21 +36,11 @@ test = TestSCons.TestSCons() test.subdir('src') - - -test.write('myjavac.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 != '/*javac*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['default', 'javac'], - JAVACCOM = r'%(_python_)s myjavac.py $TARGET $SOURCES') + JAVACCOM = r'%(_python_)s mycompile.py javac $TARGET $SOURCES') env.Java(target = 'classes', source = 'src') """ % locals()) @@ -63,8 +53,6 @@ test.run() test.must_match(['classes', 'file1.class'], "file1.java\nfile2.java\nfile3.java\n") - - test.pass_test() # Local Variables: |