summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2007-12-02 00:40:37 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2007-12-02 00:40:37 +0100
commit1fd9cc897a76128b7cec954a90063d372aa124a9 (patch)
tree5c5dc9f8564f764980cb5ba1b18d8d672d648956
parentfdabb0e9bcde5fe31071ce38fcab5a0483fcf03c (diff)
Fix git-check-commit-msg test script
Run proper test for missing test case files. Return proper exit code.
-rwxr-xr-xgit-check-commit-msg/run-tests.sh6
1 files changed, 5 insertions, 1 deletions
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