summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-03-28 11:19:18 (GMT)
committerMats Wichmann <mats@linux.com>2019-04-14 18:54:51 (GMT)
commita2a1fede9770daee1ff6d14d8870000640343fde (patch)
treebacb4c64c4a1e9ba36ccc5fae82f41290e73eeb9 /test
parentdd1f5a85f85098b6fdfb12e6585f466ad599b48c (diff)
downloadSCons-a2a1fede9770daee1ff6d14d8870000640343fde.zip
SCons-a2a1fede9770daee1ff6d14d8870000640343fde.tar.gz
SCons-a2a1fede9770daee1ff6d14d8870000640343fde.tar.bz2
Fix problems with jdk detection
The java tool common routine finds a jdk by doing a filesystem glob. This had a problem on windows in the case a specific version is requested, because the format of name of the jdk directory has changed with JDK 9 - there is a dash between jdk and the version string. The glob which does not attempt to match a version was general enough not to trip on this, but with a version to match it would never match jdk-9 or higher. The test harness then asks the found javac what version it is, and the parsing of that did not work as expected once version numbers became double-digit, as the regex was for a single digit followed by a dot. The outcome is for 11.0.2 we get back '11' instead of '11.0'. Change the regex to match any number of digits followed by dot. The Repository/RMIC.py change is to align with an earlier change to Java/RMIC.py, but the may not be needed after the change to regex just described. Clean up some of the Java tool routines for consistency (there was no functional change outside of JavaCommon.py) Docstrings added or updated in several places. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r--test/Repository/RMIC.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Repository/RMIC.py b/test/Repository/RMIC.py
index 433890f..3eeab9b 100644
--- a/test/Repository/RMIC.py
+++ b/test/Repository/RMIC.py
@@ -46,6 +46,12 @@ if java_version.count('.') == 1:
curver = (int(major), int(minor))
except:
pass
+elif java_version.count('.') == 0:
+ # java 11?
+ try:
+ curver = (int(java_version), 0)
+ except:
+ pass
# Check the version of the found Java compiler.
# If it's 1.8 or higher, we skip the further RMIC test