From a5204d9aa998e0d73247f5816b0932904d646f65 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Mon, 22 Jul 2024 11:36:10 +0200 Subject: [PATCH] Add upstream tests both as build-time tests and autopkgtests --- debian/rules | 5 +++++ debian/tests/control | 3 +++ debian/tests/fsck | 10 ++++++++++ 3 files changed, 18 insertions(+) create mode 100644 debian/tests/control create mode 100755 debian/tests/fsck diff --git a/debian/rules b/debian/rules index d3e0345..2b6a2f1 100755 --- a/debian/rules +++ b/debian/rules @@ -7,5 +7,10 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ +override_dh_auto_test: + dh_auto_test + export PATH="$(shell pwd)/fsck:$$PATH"; cd tests; ./test_fsck.sh + rm tests/exfat.img + override_dh_installchangelogs: dh_installchangelogs NEWS diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..b1bbe7e --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: fsck +Depends: @ +Restrictions: allow-stderr diff --git a/debian/tests/fsck b/debian/tests/fsck new file mode 100755 index 0000000..bbb998f --- /dev/null +++ b/debian/tests/fsck @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +export TESTDIR="${AUTOPKGTEST_TMP}/fsck_tests" + +cp -r ./tests "$TESTDIR" +cd "$TESTDIR" + +./test_fsck.sh -- 2.39.5