Disable Doxygen tests when using Java 8 or older
Check Java version in configure and define SKIP_DOXYGEN_TEST_CASES if it's less than 9, which is required by the new implementation of CommentParser used in the Doxygen tests.
This commit is contained in:
parent
a271785f1a
commit
b52af40398
3 changed files with 32 additions and 1 deletions
|
|
@ -610,11 +610,14 @@ CPP11_TEST_BROKEN = \
|
|||
# cpp11_reference_wrapper \ # No typemaps
|
||||
|
||||
# Doxygen support test cases: can only be used with languages supporting
|
||||
# Doxygen comment translation, currently only Python and Java.
|
||||
# Doxygen comment translation (currently Python and Java) and only if not
|
||||
# disabled by configure via SKIP_DOXYGEN_TEST_CASES.
|
||||
ifneq ($(SKIP_DOXYGEN_TEST_CASES),1)
|
||||
python_HAS_DOXYGEN := 1
|
||||
java_HAS_DOXYGEN := 1
|
||||
|
||||
$(eval HAS_DOXYGEN := $($(LANGUAGE)_HAS_DOXYGEN))
|
||||
endif
|
||||
|
||||
ifdef HAS_DOXYGEN
|
||||
DOXYGEN_TEST_CASES += \
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ JAVAFLAGS = @JAVAFLAGS@
|
|||
JAVA_CLASSPATH_SEP = @JAVA_CLASSPATH_SEP@
|
||||
JAVA_TOOLS_JAR = @JAVA_TOOLS_JAR@
|
||||
SCRIPTSUFFIX = _runme.java
|
||||
SKIP_DOXYGEN_TEST_CASES = @JAVA_SKIP_DOXYGEN_TEST_CASES@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = ../@top_srcdir@
|
||||
|
|
|
|||
27
configure.ac
27
configure.ac
|
|
@ -1348,6 +1348,33 @@ else
|
|||
JAVAC="$JAVACBIN"
|
||||
fi
|
||||
|
||||
# Check Java version: we require Java 9 or later for Doxygen tests.
|
||||
if test -n "$JAVAC"; then
|
||||
AC_MSG_CHECKING(if java version is 9 or greater)
|
||||
javac_version=`$JAVAC -version 2>&1`
|
||||
java_version_num=`echo $javac_version | sed -n 's/^javac //p'`
|
||||
if test -z "$java_version_num"; then
|
||||
AC_MSG_WARN([unknown format for Java version returned by $JAVAC ($javac_version)])
|
||||
JAVA_SKIP_DOXYGEN_TEST_CASES=1
|
||||
AC_MSG_RESULT(unknown)
|
||||
else
|
||||
dnl Until Java 8 version number was in format "1.x", starting from
|
||||
dnl Java 9 it's just "x".
|
||||
case $java_version_num in
|
||||
1.*)
|
||||
JAVA_SKIP_DOXYGEN_TEST_CASES=1
|
||||
AC_MSG_RESULT([no, disabling Doxygen tests])
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(JAVA_SKIP_DOXYGEN_TEST_CASES)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for java include file jni.h)
|
||||
AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue