diff options
-rw-r--r-- | src/CHANGES.txt | 5 | ||||
-rw-r--r-- | src/engine/SCons/Tool/sunc++.py | 2 | ||||
-rw-r--r-- | test/Repository/Java.py | 19 | ||||
-rw-r--r-- | test/Repository/JavaH.py | 32 | ||||
-rw-r--r-- | test/Repository/RMIC.py | 32 |
5 files changed, 65 insertions, 25 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 2e24314..70e19d4 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -144,8 +144,9 @@ RELEASE 0.97 - XXX - Add support for Visual Studio 2005 Pro. - - Fix Windows portability issues in various Visual Studio and - Java tests. + - Fix portability issues in various Visual Studio and Java tests. + + - Ignore pkgchk errors on Solaris when searching for the C++ compiler. From Christian Maaser: diff --git a/src/engine/SCons/Tool/sunc++.py b/src/engine/SCons/Tool/sunc++.py index a6ac10a..36316cb 100644 --- a/src/engine/SCons/Tool/sunc++.py +++ b/src/engine/SCons/Tool/sunc++.py @@ -53,7 +53,7 @@ def get_cppc(env): line = os.popen(cmd).readline() if line: cppcVersion = line.split()[-1] - cmd = "%s -l %s | grep '^Pathname:.*/bin/CC$' | grep -v '/SC[0-9]*\.[0-9]*/'" % (pkgchk, package) + cmd = "%s -l %s 2>/dev/null | grep '^Pathname:.*/bin/CC$' | grep -v '/SC[0-9]*\.[0-9]*/'" % (pkgchk, package) line = os.popen(cmd).readline() cppcPath = os.path.dirname(line.split()[-1]) break 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 ############################################################################### |