Commit a96621150027f46d946238e99c8236a06f79f0da

Christian Weisgerber 2021-08-29T13:01:47

add missing "return 1" to failure handling in the regress scripts ok stsp@

diff --git a/regress/cmdline/commit.sh b/regress/cmdline/commit.sh
index 833165f..4ea275e 100755
--- a/regress/cmdline/commit.sh
+++ b/regress/cmdline/commit.sh
@@ -936,6 +936,7 @@ commit_check_mode() {
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	local tree_id=$(got cat -r $testroot/repo $commit_id | \
diff --git a/regress/cmdline/histedit.sh b/regress/cmdline/histedit.sh
index 15eedc6..7de2767 100755
--- a/regress/cmdline/histedit.sh
+++ b/regress/cmdline/histedit.sh
@@ -147,6 +147,7 @@ test_histedit_no_op() {
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# We should have a backup of old commits
diff --git a/regress/cmdline/log.sh b/regress/cmdline/log.sh
index dafaee1..f4f0029 100755
--- a/regress/cmdline/log.sh
+++ b/regress/cmdline/log.sh
@@ -580,6 +580,7 @@ test_log_reverse_display() {
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# commit matching with -s applies before -R
diff --git a/regress/cmdline/rebase.sh b/regress/cmdline/rebase.sh
index 6d5ebb9..adcd68a 100755
--- a/regress/cmdline/rebase.sh
+++ b/regress/cmdline/rebase.sh
@@ -148,6 +148,7 @@ test_rebase_basic() {
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# We should have a backup of old commits
@@ -173,6 +174,7 @@ EOF
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# Asking for backups of a branch which has none should yield an error
@@ -972,6 +974,7 @@ test_rebase_forward() {
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# Forward-only rebase operations should not be backed up
diff --git a/regress/cmdline/ref.sh b/regress/cmdline/ref.sh
index 98a9f97..028eda5 100755
--- a/regress/cmdline/ref.sh
+++ b/regress/cmdline/ref.sh
@@ -69,6 +69,7 @@ test_ref_create() {
 	if [ "$ret" != "0" ]; then
 		echo "git checkout command failed unexpectedly"
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# Create a symbolic ref
diff --git a/regress/cmdline/tag.sh b/regress/cmdline/tag.sh
index c5ae022..8710f96 100755
--- a/regress/cmdline/tag.sh
+++ b/regress/cmdline/tag.sh
@@ -84,6 +84,7 @@ test_tag_create() {
 	if [ "$ret" != "0" ]; then
 		echo "git checkout command failed unexpectedly"
 		test_done "$testroot" "$ret"
+		return 1
 	fi
 
 	# Attempt to create a tag pointing at a non-commit