jjb: lttng-ust: fix gerrit FreeBSD build for < stable-2.13
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 25 Jul 2022 19:13:57 +0000 (15:13 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 25 Jul 2022 19:14:01 +0000 (15:14 -0400)
FreeBSD support was introduced in lttng-ust 2.13, however the gerrit job
can build any versions. Detect unsupported versions and exit sucessfuly.

Change-Id: Id7b08c203a4585d6a24147ad6fb547dae18b4619
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/lttng-ust/build.sh

index 5f960b4847e5c736ad5194899cabd90e605ef6ca..7341b0c63347581246859a193141babebb0f37be 100755 (executable)
@@ -182,6 +182,15 @@ cd "$SRCDIR"
 eval "$(grep '^PACKAGE_VERSION=' ./configure)"
 PACKAGE_VERSION=${PACKAGE_VERSION//\-pre*/}
 
+# Gerrit will trigger build on FreeBSD regardless of the branch, exit
+# successfuly when the version is < 2.13.
+if [[ $arch == freebsd* ]] && verlt "$PACKAGE_VERSION" "2.13"; then
+    mkdir -p "$WORKSPACE/tap/no-log"
+    echo "1..1" > "$WORKSPACE/tap/no-log/tests.log"
+    echo "ok 1 - FreeBSD build unsupported in < 2.13" >> "$WORKSPACE/tap/no-log/tests.log"
+    exit 0
+fi
+
 # Set configure options and environment variables for each build
 # configuration.
 CONF_OPTS=("--prefix=$PREFIX")
@@ -240,7 +249,7 @@ dist)
 
     # Run configure and generate the tar file
     # in the source directory
-    ./configure || failed_configure
+    ./configure --enable-jni-interface || failed_configure
     $MAKE dist
 
     # Create and enter a temporary build directory
@@ -263,7 +272,7 @@ oot-dist)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
-    "$SRCDIR/configure" || failed_configure
+    "$SRCDIR/configure" --enable-jni-interface || failed_configure
     $MAKE dist
 
     dist_srcdir="$(mktemp -d)"
This page took 0.024351 seconds and 4 git commands to generate.