]> git.sven.stormbind.net Git - sven/exfatprogs.git/commitdiff
Add upstream tests both as build-time tests and autopkgtests
authorAlessandro Astone <alessandro.astone@canonical.com>
Mon, 22 Jul 2024 09:36:10 +0000 (11:36 +0200)
committerSven Hoexter <sven@stormbind.net>
Fri, 26 Jul 2024 12:36:07 +0000 (14:36 +0200)
debian/rules
debian/tests/control [new file with mode: 0644]
debian/tests/fsck [new file with mode: 0755]

index d3e03453fb214263669253a98af09339b570009c..2b6a2f1e3e60dd73d12a52086ef6b7ee91a3cfb7 100755 (executable)
@@ -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 (file)
index 0000000..b1bbe7e
--- /dev/null
@@ -0,0 +1,3 @@
+Tests: fsck
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/fsck b/debian/tests/fsck
new file mode 100755 (executable)
index 0000000..bbb998f
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+export TESTDIR="${AUTOPKGTEST_TMP}/fsck_tests"
+
+cp -r ./tests "$TESTDIR"
+cd "$TESTDIR"
+
+./test_fsck.sh