diff options
Diffstat (limited to 'test/Repository/Java.py')
-rw-r--r-- | test/Repository/Java.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/test/Repository/Java.py b/test/Repository/Java.py index 6a45dff..6e8bbd6 100644 --- a/test/Repository/Java.py +++ b/test/Repository/Java.py @@ -37,11 +37,22 @@ python = TestSCons.python test = TestSCons.TestSCons() -java = '/usr/local/j2sdk1.3.1/bin/java' -javac = '/usr/local/j2sdk1.3.1/bin/javac' +ENV = test.java_ENV() -if not os.path.exists(javac): - test.skip_test("Could not find Java, skipping test(s).\n") +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 test(s).\n") + +where_java = test.where_is('java') +if not where_java: + test.skip_test("Could not find Java java, skipping test(s).\n") + + +java = where_java +javac = where_javac ############################################################################### |