summaryrefslogtreecommitdiffstats
path: root/debian/tests/run-tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 09:59:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 09:59:38 +0000
commitff83fcf9b9090b4ce27b3566f74a12a78bf07a10 (patch)
tree810db5b9e99a40e5cb043761770f2b8960109f83 /debian/tests/run-tests
parentAdding upstream version 2.7.12. (diff)
downloadapt-ff83fcf9b9090b4ce27b3566f74a12a78bf07a10.tar.xz
apt-ff83fcf9b9090b4ce27b3566f74a12a78bf07a10.zip
Adding debian version 2.7.12.debian/2.7.12
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/tests/run-tests37
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/tests/run-tests b/debian/tests/run-tests
new file mode 100644
index 0000000..c7ca16b
--- /dev/null
+++ b/debian/tests/run-tests
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+SOURCE_DIR="$(pwd)"
+if [ -z "$AUTOPKGTEST_TMP" ]; then
+ BUILD_DIR=''
+ cleanup() {
+ if [ -n "$BUILD_DIR" ]; then cd /; rm -rf -- "$BUILD_DIR"; fi
+ BUILD_DIR=''
+ }
+ trap 'cleanup' 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
+ BUILD_DIR="$(mktemp -d)"
+else
+ BUILD_DIR="$AUTOPKGTEST_TMP"
+fi
+
+if [ ! -e "${BUILD_DIR}/CMakeCache.txt" ]; then
+ cmake -S "$SOURCE_DIR" -B "$BUILD_DIR" -DUSE_SYSTEM_APTPKG=ON -DWITH_DOC=OFF -DUSE_NLS=OFF
+fi
+
+make -C "${BUILD_DIR}/test/interactive-helper"
+
+# run tests against the installed apt, use "env -i" to ensure
+# the host env does not pollute our environment
+env -i \
+APT_INTEGRATION_TESTS_SOURCE_DIR="${SOURCE_DIR}" \
+APT_INTEGRATION_TESTS_BUILD_DIR="${BUILD_DIR}" \
+APT_INTEGRATION_TESTS_METHODS_DIR=/usr/lib/apt/methods \
+APT_INTEGRATION_TESTS_LIBEXEC_DIR=/usr/lib/apt/ \
+APT_INTEGRATION_TESTS_INTERNAL_SOLVER=/usr/lib/apt/solvers/apt \
+APT_INTEGRATION_TESTS_DUMP_SOLVER=/usr/lib/apt/solvers/dump \
+APT_INTEGRATION_TESTS_INTERNAL_PLANNER=/usr/lib/apt/planners/apt \
+APT_INTEGRATION_TESTS_FTPARCHIVE_BIN_DIR=/usr/bin \
+APT_INTEGRATION_TESTS_CMDLINE_BIN_DIR=/usr/bin \
+APT_INTEGRATION_TESTS_LIBRARY_PATH=/dev/null/does/not/exist \
+APT_INTEGRATION_TESTS_ARTIFACTS_DIR="${AUTOPKGTEST_ARTIFACTS}" \
+"${SOURCE_DIR}/test/integration/run-tests" -q