Browse Source

Add a rudimentary autopkgtest

Christoph Biedl 3 years ago
parent
commit
b98837a6b2
2 changed files with 28 additions and 0 deletions
  1. 13 0
      debian/tests/control
  2. 15 0
      debian/tests/run-testsuite

+ 13 - 0
debian/tests/control

@@ -0,0 +1,13 @@
+Tests: run-testsuite
+Depends:
+    clevis-dracut,
+    clevis-initramfs,
+    clevis-tpm2,
+    clevis-udisks2,
+    cryptsetup,
+    jose,
+    jq,
+    moreutils,
+    openssl,
+Restrictions:
+    needs-root,

+ 15 - 0
debian/tests/run-testsuite

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+cd src/luks/tests
+
+# patch out lukv2 detection switch - we're on the bright side already
+sed -e 's/@OLD_CRYPTSETUP@/0/' \
+    <tests-common-functions.in >tests-common-functions
+
+for f in $(find . -type f -not -name 'tests-common-functions*' -executable | sort) ; do
+    echo "I: Running test $f"
+    # test are very noisy, keep them silent as long as they pass
+    chronic "$f" || :
+done