[disorderfs] 01/01: Add simple autopkgtest.

Chris Lamb chris at chris-lamb.co.uk
Sat Aug 19 16:33:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch debian
in repository disorderfs.

commit d0972aad0e1d6d94e523b0c54d04422e545cde6d
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Aug 19 09:33:11 2017 -0700

    Add simple autopkgtest.
---
 debian/tests/0001-smoketest | 37 +++++++++++++++++++++++++++++++++++++
 debian/tests/control        |  3 +++
 2 files changed, 40 insertions(+)

diff --git a/debian/tests/0001-smoketest b/debian/tests/0001-smoketest
new file mode 100755
index 0000000..7c0e3af
--- /dev/null
+++ b/debian/tests/0001-smoketest
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Simple smoketest of disorderfs
+
+set -eu
+
+# Lots of test environments simply can't install fuse.
+if ! modprobe fuse
+then
+	exit 0
+fi
+
+mkdir -p rootdir
+mkdir -p mountpoint
+touch rootdir/a rootdir/b
+
+trap 'rm -rf rootdir mountpoint' EXIT
+
+Test () {
+	EXPECTED="${1}"
+	shift 1
+
+	echo "I: Testing $*" >&2
+
+	disorderfs --sort-dirents=yes "${@}" rootdir mountpoint
+	OUTPUT="$(find mountpoint -type f -printf '%f')"
+	fusermount -u mountpoint
+
+	if [ "${OUTPUT}" != "${EXPECTED}" ]
+	then
+		echo "E: $*: Expected: \"${EXPECTED}\", saw \"${OUTPUT}\"" >&2
+		exit 2
+	fi
+}
+
+Test ab --reverse-dirents=no
+Test ba --reverse-dirents=yes
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d9f88c3
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: 0001-smoketest
+Depends: @, kmod
+Restrictions: needs-root, isolation-machine, allow-stderr

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/disorderfs.git



More information about the Reproducible-commits mailing list