From 57f3872e7eb7ba399aa8e6be6589fbaae3255ef9 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 2 Dec 2007 00:40:37 +0100 Subject: Fix git-check-commit-msg test script Run proper test for missing test case files. Return proper exit code. --- git-check-commit-msg/run-tests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'git-check-commit-msg') diff --git a/git-check-commit-msg/run-tests.sh b/git-check-commit-msg/run-tests.sh index d3da61c..3b43f16 100755 --- a/git-check-commit-msg/run-tests.sh +++ b/git-check-commit-msg/run-tests.sh @@ -8,7 +8,10 @@ errors=0 while read tc expect restofline do tcfile="${tcdir}/git-check-commit-msg/${tc}" - test -s "$tcfile" || continue + test -f "$tcfile" || { + echo "$0: Fatal: Test file $tcfile not found." >&2 + exit 1 + } "$script" "$tcfile"; s="$?" @@ -26,3 +29,4 @@ commit-3 OK EOF [ "$errors" -ne 0 ] && exit 1 +exit 0 -- cgit