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 | e7190df6b6aa89dac0370dc01ae45ff39254c221 (patch) | |
tree | 3a95657ab680d4288110e8f1046b0d033997bd5f /test | |
parent | 9655a1b459e6bb81ba44539d54e20d05b515b495 (diff) | |
download | SCons-e7190df6b6aa89dac0370dc01ae45ff39254c221.zip SCons-e7190df6b6aa89dac0370dc01ae45ff39254c221.tar.gz SCons-e7190df6b6aa89dac0370dc01ae45ff39254c221.tar.bz2 |
Portability fixes for Repository Java tests; eliminate Solaris package warnings when searching for C++. (Baptiste Lepilleur)
Diffstat (limited to 'test')
-rw-r--r-- | test/Repository/Java.py | 19 | ||||
-rw-r--r-- | test/Repository/JavaH.py | 32 | ||||
-rw-r--r-- | test/Repository/RMIC.py | 32 |
3 files changed, 61 insertions, 22 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 ############################################################################### 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 ############################################################################### diff --git a/test/Repository/RMIC.py b/test/Repository/RMIC.py index 011006d..e4a4459 100644 --- a/test/Repository/RMIC.py +++ b/test/Repository/RMIC.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' -rmic = '/usr/local/j2sdk1.3.1/bin/rmic' - -if not os.path.exists(javac): - test.skip_test("Could not find Java (javac), skipping test(s).\n") - -if not os.path.exists(rmic): - test.skip_test("Could not find Java (rmic), 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('rmic', ENV=ENV): + where_rmic = test.detect('JAVAC', '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_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 +rmic = where_rmic ############################################################################### |