# Run 'unit_tests', 2.8 and up has a new test suite
if vergte "$PACKAGE_VERSION" "2.8"; then
+ # It is implied that tests depending on LTTNG_ENABLE_DESTRUCTIVE_TESTS
+ # only run for the root user. Note that here `destructive` means that
+ # operations are performed at the host level (add user etc.) that
+ # effectively modify the host. Running those tests are acceptable on our
+ # CI and root jobs since we always run root tests against a `snapshot`
+ # of the host.
+ if [ "$(id -u)" == "0" ]; then
+ export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system"
+ fi
make --keep-going check || failed_tests=1
rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$TAPDIR"
else
fi
elif vergte "$lttng_version" "2.13"; then
# All root regression are now part of the make check
+ # *destructive* tests are now part of the `make`-based test suites.
+ export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system"
make --keep-going check || failed_tests=1
else
make --keep-going check || failed_tests=1