build=${build:-}
cc=${cc:-}
+# Controls if the tests are run
+USERSPACE_RCU_RUN_TESTS="${USERSPACE_RCU_RUN_TESTS:=yes}"
SRCDIR="$WORKSPACE/src/liburcu"
TMPDIR="$WORKSPACE/tmp"
# Run tests, don't fail now, we want to run the archiving steps
failed_tests=0
-$MAKE --keep-going check || failed_tests=1
-# Only run regtest for 0.9 and up
-if vergte "$PACKAGE_VERSION" "0.9"; then
- $MAKE --keep-going regtest || failed_tests=1
-fi
+if [ "$USERSPACE_RCU_RUN_TESTS" = "yes" ]; then
+ $MAKE --keep-going check || failed_tests=1
+ # Only run regtest for 0.9 and up
+ if vergte "$PACKAGE_VERSION" "0.9"; then
+ $MAKE --keep-going regtest || failed_tests=1
+ fi
-# 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 0.11 did not produce TAP logs
-if verlt "$PACKAGE_VERSION" "0.11"; 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 0.11 did not produce TAP logs
+ if verlt "$PACKAGE_VERSION" "0.11"; 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
export PYTHON="python3"
export PYTHON_CONFIG="python3-config"
- RUN_TESTS="no"
+ LTTNG_TOOLS_RUN_TESTS="no"
;;
sol11-i386)
export PYTHON_CONFIG="python3-config"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/pkgconfig"
- RUN_TESTS="no"
+ LTTNG_TOOLS_RUN_TESTS="no"
;;
macos*)
export PYTHON="python3.9"
export PYTHON_CONFIG="python3.9-config"
- RUN_TESTS="no"
+ LTTNG_TOOLS_RUN_TESTS="no"
;;
cygwin|cygwin64|msys32|msys64)
export TAR=tar
export NPROC=nproc
- RUN_TESTS="no"
+ LTTNG_TOOLS_RUN_TESTS="no"
;;
*)
export TAR=tar
export NPROC=nproc
- RUN_TESTS="yes"
+ LTTNG_TOOLS_RUN_TESTS="yes"
PYTHON2=python2
PYTHON3=python3
case "$test_type" in
full)
- RUN_TESTS_LONG_REGRESSION="yes"
+ LTTNG_TOOLS_RUN_TESTS_LONG_REGRESSION="yes"
;;
*)
- RUN_TESTS_LONG_REGRESSION="no"
+ LTTNG_TOOLS_RUN_TESTS_LONG_REGRESSION="no"
;;
esac
# Run tests for all configs except 'no-ust'
failed_tests=0
-if [ "$RUN_TESTS" = "yes" ] && [ "$conf" != "no-ust" ]; then
+if [ "$LTTNG_TOOLS_RUN_TESTS" = "yes" ] && [ "$conf" != "no-ust" ]; then
# Allow core dumps
ulimit -c unlimited
cd ..
fi
- if [ "$RUN_TESTS_LONG_REGRESSION" = "yes" ]; then
+ if [ "$LTTNG_TOOLS_RUN_TESTS_LONG_REGRESSION" = "yes" ]; then
cd tests
mkdir -p "$TAPDIR/long_regression"
prove --merge -v --exec '' - < long_regression --archive "$TAPDIR/long_regression/" || failed_tests=1
# Export the GERRIT_DEP_... into the property file for further jenkins usage
echo "GERRIT_DEP_${project_sanitize^^}=${gerrit_id}" >> "$property_file"
+ # Deactivate tests for the project
+ echo "${project_sanitize^^}_RUN_TESTS=no" >> "$property_file"
# Get the change latest ref
ref=$(curl "${gerrit_url}/changes/${gerrit_id}${gerrit_query}" | tail -n+2 | jq -r "$gerrit_json_query")
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"
# 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