#!/bin/sh
# Run upstream runtime tests
# Assumes $AUTOPKGTEST_TMP is set, see /usr/share/doc/autopkgtest/README.package-tests.gz

# We just copy and run the entire test suite to resp. from the $AUTOPKGTEST_TMP
# directory because it generates output within each test's source directory.
set -e
cp -r tests "$AUTOPKGTEST_TMP/upstream-runtime-tests"
cd "$AUTOPKGTEST_TMP/upstream-runtime-tests"
set +e

# Skip tests requiring either root or /sbin/request-key, as they don't work
# with some container solutions due to their close interaction with the kernel.
# See #923156
make SKIPROOTREQ=yes SKIPINSTALLREQ=yes run

# Save all test output files so that they can be accessed from ci.debian.net
cp -r keyctl "$AUTOPKGTEST_ARTIFACTS/upstream-runtime-tests"
