X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-ust%2Fbuild.sh;h=37763e65cbbdbc5d78f2bd4d52f4066b2916fb7d;hb=aff4e3d1bb7db06b8970e31efa2f5a56486355f7;hp=6b6f34164cf16fc160a0b8497b8c2259f42c0f27;hpb=51c9c62db1805a4cdd96be18df4082f1ac5d81c5;p=lttng-ci.git diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 6b6f341..37763e6 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -89,6 +89,8 @@ conf=${conf:-} build=${build:-} cc=${cc:-} +# Controls if the tests are run +LTTNG_UST_RUN_TESTS="${LTTNG_UST_RUN_TESTS:=yes}" DEPS_INC="$WORKSPACE/deps/build/include" DEPS_LIB="$WORKSPACE/deps/build/lib" @@ -176,12 +178,25 @@ fi # Set platform variables case "$arch" in +freebsd) + export MAKE=gmake + export TAR=tar + export NPROC="getconf _NPROCESSORS_ONLN" + export CPPFLAGS="-I/usr/local/include $CPPFLAGS" + export LDFLAGS="-L/usr/local/lib $LDFLAGS" + export PYTHON="python3" + export PYTHON_CONFIG="python3-config" + export CLASSPATH='/usr/local/share/java/classes/*' + export JAVA_HOME='/usr/local/openjdk11' + ;; + *) export MAKE=make export TAR=tar export NPROC=nproc export PYTHON="python3" export PYTHON_CONFIG="python3-config" + export CLASSPATH='/usr/share/java/*' ;; esac @@ -215,7 +230,6 @@ static) agents) echo "Java and Python agents configuration" - export CLASSPATH='/usr/share/java/*' CONF_OPTS+=("--enable-java-agent-all" "--enable-jni-interface" "--enable-python-agent") ;; @@ -311,16 +325,18 @@ $MAKE install DESTDIR="$WORKSPACE" # Run tests, don't fail now, we want to run the archiving steps failed_tests=0 -$MAKE --keep-going check || failed_tests=1 +if [ "$LTTNG_UST_RUN_TESTS" = "yes" ]; then + $MAKE --keep-going check || failed_tests=1 -# Copy tap logs for the jenkins tap parser before cleaning the build dir -rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$WORKSPACE/tap" + # Copy tap logs for the jenkins tap parser before cleaning the build dir + rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$WORKSPACE/tap" -# The test suite prior to 2.8 did not produce TAP logs -if verlt "$PACKAGE_VERSION" "2.8"; then - mkdir -p "$WORKSPACE/tap/no-log" - echo "1..1" > "$WORKSPACE/tap/no-log/tests.log" - echo "ok 1 - Test suite doesn't support logging" >> "$WORKSPACE/tap/no-log/tests.log" + # The test suite prior to 2.8 did not produce TAP logs + if verlt "$PACKAGE_VERSION" "2.8"; then + mkdir -p "$WORKSPACE/tap/no-log" + echo "1..1" > "$WORKSPACE/tap/no-log/tests.log" + echo "ok 1 - Test suite doesn't support logging" >> "$WORKSPACE/tap/no-log/tests.log" + fi fi # Clean the build directory