summaryrefslogtreecommitdiff
path: root/test/Repository
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2014-08-08 19:32:48 +0200
committerDirk Baechle <dl9obn@darc.de>2014-08-08 19:32:48 +0200
commit1528a39f85503a7ad5e8adbcf9e7566c00ba9602 (patch)
tree3d5f600e0cf6d38c1fd52cf9524f4e5db6238ae4 /test/Repository
parentd6151edc7c0e6669173726a1f8f00bb31a086ff8 (diff)
downloadscons-1528a39f85503a7ad5e8adbcf9e7566c00ba9602.tar.gz
- added javac version sentinel to another test that would fail with v1.8 and higher
Diffstat (limited to 'test/Repository')
-rw-r--r--test/Repository/RMIC.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Repository/RMIC.py b/test/Repository/RMIC.py
index b214b4bd..886ccdbc 100644
--- a/test/Repository/RMIC.py
+++ b/test/Repository/RMIC.py
@@ -35,6 +35,27 @@ python = TestSCons.python
test = TestSCons.TestSCons()
where_javac, java_version = test.java_where_javac()
+
+# Try to get the major/minor Java version
+curver = (1, 0)
+if java_version.count('.') == 1:
+ # Check Java version
+ major, minor = java_version.split('.')
+ try:
+ curver = (int(major), int(minor))
+ except:
+ pass
+
+# Check the version of the found Java compiler.
+# If it's 1.8 or higher, we skip the further RMIC test
+# because we'll get warnings about the deprecated API...
+# it's just not state-of-the-art anymore.
+# Note, how we allow simple version strings like "5" and
+# "6" to successfully pass this test.
+if curver >= (1, 8):
+ test.skip_test('The found version of javac is higher than 1.7, skipping test.\n')
+
+
where_java = test.java_where_java()
where_rmic = test.java_where_rmic()