summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-11-01 17:53:11 (GMT)
committerMats Wichmann <mats@linux.com>2021-11-01 17:53:11 (GMT)
commit850bc69d26d078008e750b1a6c096655499bb1ca (patch)
treea03b4b8b1c6d3355b0185ed1a593ab743ece2668
parent4fc7d2a63b0e0aad569d4218e8b8b28a68db8520 (diff)
downloadSCons-850bc69d26d078008e750b1a6c096655499bb1ca.zip
SCons-850bc69d26d078008e750b1a6c096655499bb1ca.tar.gz
SCons-850bc69d26d078008e750b1a6c096655499bb1ca.tar.bz2
Also make Repository/JavaH test skip if mismatched javah
Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--test/Repository/JavaH.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Repository/JavaH.py b/test/Repository/JavaH.py
index 77f097d..fea5f5b 100644
--- a/test/Repository/JavaH.py
+++ b/test/Repository/JavaH.py
@@ -28,6 +28,7 @@ Test building Java applications when using Repositories.
"""
import os
+import pathlib
import TestSCons
@@ -39,6 +40,13 @@ where_javac, java_version = test.java_where_javac()
where_java = test.java_where_java()
where_javah = test.java_where_javah()
+# On some systems, the alternatives system does not remove javah even if the
+# preferred Java doesn't have it, check the paths just in case.
+javacdir = pathlib.Path(where_javac).parent
+javahdir = pathlib.Path(where_javah).parent
+if javacdir != javahdir:
+ test.skip_test("Cannot find Java javah matching javac, skipping test.\n")
+
java = where_java
javac = where_javac
javah = where_javah
@@ -58,7 +66,7 @@ test.subdir(
['rep1', 'src'],
'work1',
'work2',
- 'work3'
+ 'work3',
)
#