diff options
Diffstat (limited to 'test/Java/RMIC.py')
-rw-r--r-- | test/Java/RMIC.py | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/test/Java/RMIC.py b/test/Java/RMIC.py index 2ab1804..f9721c2 100644 --- a/test/Java/RMIC.py +++ b/test/Java/RMIC.py @@ -92,21 +92,8 @@ line 3 test.fail_test(test.read(['outdir', 'test2.class']) != "test2.JAVA\nline 3\n") -ENV = test.java_ENV() - -if test.detect_tool('javac', ENV=ENV): - where_javac = test.detect('JAVAC', 'javac', ENV=ENV) -else: - where_javac = test.where_is('javac') -if not where_javac: - test.skip_test("Could not find Java javac, skipping non-simulated test(s).\n") - -if test.detect_tool('rmic', ENV=ENV): - where_rmic = test.detect('RMIC', 'rmic', ENV=ENV) -else: - where_rmic = test.where_is('rmic') -if not where_rmic: - test.skip_test("Could not find Java rmic, skipping non-simulated test(s).\n") +where_javac, java_version = test.java_where_javac() +where_rmic = test.java_where_rmic() test.write("wrapper.py", """\ import os @@ -319,15 +306,20 @@ test.run(arguments = '.') test.fail_test(test.read('wrapper.out') != "wrapper.py %s -d outdir2 -classpath class2 com.sub.bar.Example3 com.sub.bar.Example4\n" % where_rmic) -test.fail_test(not os.path.exists(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example1_Skel.class'))) -test.fail_test(not os.path.exists(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example1_Stub.class'))) -test.fail_test(not os.path.exists(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example2_Skel.class'))) -test.fail_test(not os.path.exists(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example2_Stub.class'))) - -test.fail_test(not os.path.exists(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example3_Skel.class'))) -test.fail_test(not os.path.exists(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example3_Stub.class'))) -test.fail_test(not os.path.exists(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example4_Skel.class'))) -test.fail_test(not os.path.exists(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example4_Stub.class'))) +test.must_exist(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example1_Stub.class')) +test.must_exist(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example2_Stub.class')) +test.must_exist(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example3_Stub.class')) +test.must_exist(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example4_Stub.class')) + +# We used to check for _Skel.class files as well, but they're not +# generated by default starting with Java 1.5, and they apparently +# haven't been needed for a while. Don't bother looking, even if we're +# running Java 1.4. If we think they're needed but they don't exist +# the test.up_to_date() call below will detect it. +#test.must_exist(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example1_Skel.class')) +#test.must_exist(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example2_Skel.class')) +#test.must_exist(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example3_Skel.class')) +#test.must_exist(test.workpath('outdir2', 'com', 'sub', 'bar', 'Example4_Skel.class')) test.up_to_date(arguments = '.') |