summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-07-27 12:47:24 +0800
committerBen Hutchings <benh@debian.org>2020-09-06 23:40:03 +0100
commit3dd298490b61c9bc163acbac8a56ed9568455bd9 (patch)
tree4fb8fb48f2c8c538f2ef7f94f23d46376500f155
parent90d64bd8b9d58b42922882826d01913f6e8623e6 (diff)
debian/tests: Add basic test for amd64 using klibc and not busybox
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rwxr-xr-xdebian/tests/amd64-klibc19
-rw-r--r--debian/tests/control3
2 files changed, 22 insertions, 0 deletions
diff --git a/debian/tests/amd64-klibc b/debian/tests/amd64-klibc
new file mode 100755
index 0000000..8d89b9b
--- /dev/null
+++ b/debian/tests/amd64-klibc
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+LOCALVERSION=-amd64
+. debian/tests/test-common
+
+cat >>"${CONFDIR}/initramfs.conf" <<EOF
+MODULES=most
+BUSYBOX=n
+FSTYPE=ext2
+EOF
+build_initramfs
+! lsinitramfs "${INITRAMFS}" | grep -qw busybox
+
+build_rootfs_ext2
+
+run_qemu_amd64
+
+# Check that fsck ran
+grep -q "^/dev/${ROOTDISK_LINUX_NAME}: clean," "${OUTPUT}"
diff --git a/debian/tests/control b/debian/tests/control
index 38b6014..3c20b12 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,6 @@
Tests: shellcheck
Depends: @, shellcheck
Restrictions: superficial
+
+Tests: amd64-klibc
+Depends: @, qemu-system-x86, linux-image-amd64, klibc-utils, genext2fs