[Debian-ha-commits] [ocfs2-tools] 01/03: debian/tests: add basic test for lxc

Valentin Vidic vvidic-guest at moszumanska.debian.org
Fri Oct 21 14:45:52 UTC 2016


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

vvidic-guest pushed a commit to branch master
in repository ocfs2-tools.

commit 5846646f7dd933029b9e45e88d642a0f5b91b40b
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Fri Oct 21 16:15:23 2016 +0200

    debian/tests: add basic test for lxc
---
 debian/tests/basic   | 25 +++++++++++++++++++++++++
 debian/tests/control |  4 ++++
 2 files changed, 29 insertions(+)

diff --git a/debian/tests/basic b/debian/tests/basic
new file mode 100644
index 0000000..ecb4beb
--- /dev/null
+++ b/debian/tests/basic
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+DISK=$AUTOPKGTEST_TMP/disk
+
+cleanup () {
+  rm -f $DISK || true
+}
+
+trap "cleanup" 0 2 3 15
+
+# create test disk
+echo "=== disk ==="
+dd if=/dev/zero of=$DISK bs=1M count=200 2>&1
+
+# test tools
+echo "=== mkfs ==="
+mkfs.ocfs2 --force $DISK 2>&1
+
+echo "=== fsck ==="
+yes | fsck.ocfs2 -f -y -F $DISK 2>&1
+
+echo "=== debugfs ==="
+debugfs.ocfs2 -R stats $DISK
diff --git a/debian/tests/control b/debian/tests/control
index 91f3c3a..834cff8 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,4 +1,8 @@
 Depends: ocfs2-tools
+Tests: basic
+Restrictions: needs-root
+
+Depends: ocfs2-tools
 Tests: o2cb
 Restrictions: needs-root, isolation-machine
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git



More information about the Debian-HA-Commits mailing list