summaryrefslogtreecommitdiffstats
path: root/debian/tests/run-upstream-tests
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/run-upstream-tests')
-rwxr-xr-xdebian/tests/run-upstream-tests18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/tests/run-upstream-tests b/debian/tests/run-upstream-tests
new file mode 100755
index 0000000..5dce6cf
--- /dev/null
+++ b/debian/tests/run-upstream-tests
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -eu
+
+if test -n "${AUTOPKGTEST_TMP-}"; then
+ export TMPDIR="${AUTOPKGTEST_TMP}"
+fi
+
+# shellcheck disable=SC2012
+KVERSION=$(cd /lib/modules; ls -1 | tail -1)
+export KVERSION
+export DRACUT=dracut
+export PKGLIBDIR=/usr/lib/dracut
+
+# Prapare out-of-tree test directory
+TESTDIR="$(mktemp -d -t dracut-test.XXXXXXXXXX)"
+cp -r test/* "$TESTDIR"
+
+make -C "$TESTDIR" V=1 check "$@"