[Reproducible-commits] [disorderfs] 01/03: tests/common: Factor out "Fail" utility.
Chris Lamb
chris at chris-lamb.co.uk
Thu Aug 25 14:21:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository disorderfs.
commit 7a649d99e9d66aab1ec8f38974f56685f8df6d90
Author: Chris Lamb <lamby at debian.org>
Date: Thu Aug 25 15:12:23 2016 +0100
tests/common: Factor out "Fail" utility.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
tests/common | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/common b/tests/common
index 9df1957..013c998 100644
--- a/tests/common
+++ b/tests/common
@@ -10,13 +10,17 @@ Unmount () {
fusermount -u target/ 2>/dev/null && rm -rf target/
}
+Fail () {
+ echo "E: ${*}"
+ exit 1
+}
+
Expect () {
ENTRIES="$(find target -type f -printf %f)"
EXPECTED="${1}"
if [ "${ENTRIES}" != "${EXPECTED}" ]
then
- echo "E: saw ${ENTRIES}, expected ${EXPECTED}"
- exit 1
+ Fail "saw ${ENTRIES}, expected ${EXPECTED}"
fi
}
--
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