From: Kienan Stewart Date: Thu, 29 Feb 2024 14:18:16 +0000 (-0500) Subject: jjb: Test java agents using log4j 2.17.1 on slesbuilds X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9a269c66154080f85e83433b86fdacec726d6865;p=lttng-ci.git jjb: Test java agents using log4j 2.17.1 on slesbuilds Change-Id: Ic881c44577f8dc291363e219386b512bb340cbf8 Signed-off-by: Kienan Stewart --- diff --git a/jobs/lttng-tools.yaml b/jobs/lttng-tools.yaml index 4a4b60d..06c6a53 100644 --- a/jobs/lttng-tools.yaml +++ b/jobs/lttng-tools.yaml @@ -163,6 +163,8 @@ fi if [ "{buildtype}" = "slesbuild" ] ; then echo "TAP_AUTOTIME=0" >> env.properties + # On SLES, force log4j to 2.17.1 + echo "LTTNG_TOOLS_UST_JAVA_TESTS_LOG4J_API_VERSION=2.17.1" >> env.properties fi echo "liburcu_conf=$liburcu_conf" >> env.properties echo "babeltrace_conf=$babeltrace_conf" >> env.properties diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 9c1a539..6b88a1d 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -583,10 +583,16 @@ if [ "$LTTNG_TOOLS_RUN_TESTS" = "yes" ] && [[ ! "$conf" =~ (no-ust|relayd-only) "-DargLine=-Djava.library.path=${WORKSPACE}/deps/build/${LIBDIR_ARCH}" '-Dgroups=!domain:log4j2' ) + env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn -version + + if [[ -n "${LTTNG_TOOLS_UST_JAVA_TESTS_LOG4J_API_VERSION:-}" ]] ; then + env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn versions:use-dep-version -Dincludes=org.apache.logging.log4j:'*' -DdepVersion="${LTTNG_TOOLS_UST_JAVA_TESTS_LOG4J_API_VERSION}" + fi + mkdir -p "${WORKSPACE}/log" env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" lttng-sessiond -b -vvv 1>"${WORKSPACE}/log/lttng-ust-java-tests-lttng-sessiond.log" 2>&1 - env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn "${LTTNG_UST_JAVA_TESTS_MAVEN_OPTS[@]}" clean verify || exit_status=1 + env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn "${LTTNG_UST_JAVA_TESTS_MAVEN_OPTS[@]}" clean compile dependency:build-classpath dependency:tree verify || exit_status=1 killall lttng-sessiond cd "${OWD}"