summaryrefslogtreecommitdiffstats
path: root/test/Java/JAVACCOMSTR.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Java/JAVACCOMSTR.py')
-rw-r--r--test/Java/JAVACCOMSTR.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/test/Java/JAVACCOMSTR.py b/test/Java/JAVACCOMSTR.py
index 6440283..8540e13 100644
--- a/test/Java/JAVACCOMSTR.py
+++ b/test/Java/JAVACCOMSTR.py
@@ -39,21 +39,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',
JAVACCOMSTR = "Compiling class(es) $TARGET from $SOURCES")
env.Java(target = 'classes', source = 'src')
""" % locals())
@@ -74,8 +64,6 @@ Compiling class(es) %(classes_file1_class)s from %(src_file1_java)s %(src_file2_
test.must_match(['classes', 'file1.class'],
"file1.java\nfile2.java\nfile3.java\n")
-
-
test.pass_test()
# Local Variables: