- 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:
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
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
###############################################################################
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
###############################################################################
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
###############################################################################