diff options
author | Steven Knight <knight@baldmt.com> | 2006-02-14 05:27:04 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2006-02-14 05:27:04 (GMT) |
commit | bac3ddcd958b3e1f4c33ad2b6b0dcb09dbeaff6c (patch) | |
tree | 3a95657ab680d4288110e8f1046b0d033997bd5f /test/Repository/JavaH.py | |
parent | e845a0765fc8aacfacfc60b096ca09ef3bcb0898 (diff) | |
download | SCons-bac3ddcd958b3e1f4c33ad2b6b0dcb09dbeaff6c.zip SCons-bac3ddcd958b3e1f4c33ad2b6b0dcb09dbeaff6c.tar.gz SCons-bac3ddcd958b3e1f4c33ad2b6b0dcb09dbeaff6c.tar.bz2 |
Portability fixes for Repository Java tests; eliminate Solaris package warnings when searching for C++. (Baptiste Lepilleur)
Diffstat (limited to 'test/Repository/JavaH.py')
-rw-r--r-- | test/Repository/JavaH.py | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/test/Repository/JavaH.py b/test/Repository/JavaH.py index 0420ca3..fc87904 100644 --- a/test/Repository/JavaH.py +++ b/test/Repository/JavaH.py @@ -37,15 +37,29 @@ python = TestSCons.python test = TestSCons.TestSCons() -java = '/usr/local/j2sdk1.3.1/bin/java' -javac = '/usr/local/j2sdk1.3.1/bin/javac' -javah = '/usr/local/j2sdk1.3.1/bin/javah' - -if not os.path.exists(javac): - test.skip_test("Could not find Java (javac), skipping test(s).\n") - -if not os.path.exists(javah): - test.skip_test("Could not find Java (javah), skipping test(s).\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 test(s).\n") + +if test.detect_tool('javah', ENV=ENV): + where_javah = test.detect('JAVAH', 'javah', ENV=ENV) +else: + where_javah = test.where_is('javah') +if not where_javah: + test.skip_test("Could not find Java javah, 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 +javah = where_javah ############################################################################### |