Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-08-30 00:55:15 +0300
committerJunio C Hamano <gitster@pobox.com>2022-08-30 00:55:15 +0300
commit3658170b92b16aa369573e90968ab887ba070133 (patch)
tree327fc776fc75cffad4bb168ba0ffe9fa46c56b9b
parent0d2cf1668079ea128a2f91b4e4d36324ee9e3a5c (diff)
parent9905e80b0fd9af3e6536d6201bf0198ffa48e8c9 (diff)
Merge branch 'es/fix-chained-tests'
Fix broken "&&-" chains and failures in early iterations of a loop. * es/fix-chained-tests: t5329: notice a failure within a loop t: detect and signal failure within loop t1092: fix buggy sparse "blame" test t2407: fix broken &&-chains in compound statement
-rwxr-xr-xt/perf/p7527-builtin-fsmonitor.sh2
-rwxr-xr-xt/t1092-sparse-checkout-compatibility.sh10
-rwxr-xr-xt/t2407-worktree-heads.sh4
-rwxr-xr-xt/t5329-pack-objects-cruft.sh9
-rwxr-xr-xt/t6429-merge-sequence-rename-caching.sh2
5 files changed, 14 insertions, 13 deletions
diff --git a/t/perf/p7527-builtin-fsmonitor.sh b/t/perf/p7527-builtin-fsmonitor.sh
index 9338b9ea00..c3f9a4caa4 100755
--- a/t/perf/p7527-builtin-fsmonitor.sh
+++ b/t/perf/p7527-builtin-fsmonitor.sh
@@ -249,7 +249,7 @@ test_expect_success "Cleanup temp and matrix branches" "
do
for fsm_val in $fsm_values
do
- cleanup $uc_val $fsm_val
+ cleanup $uc_val $fsm_val || return 1
done
done
"
diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
index a6a14c8a21..0302e36fd6 100755
--- a/t/t1092-sparse-checkout-compatibility.sh
+++ b/t/t1092-sparse-checkout-compatibility.sh
@@ -556,7 +556,7 @@ test_expect_success 'blame with pathspec inside sparse definition' '
deep/deeper1/a \
deep/deeper1/deepest/a
do
- test_all_match git blame $file
+ test_all_match git blame $file || return 1
done
'
@@ -567,7 +567,7 @@ test_expect_success 'blame with pathspec outside sparse definition' '
init_repos &&
test_sparse_match git sparse-checkout set &&
- for file in a \
+ for file in \
deep/a \
deep/deeper1/a \
deep/deeper1/deepest/a
@@ -579,7 +579,7 @@ test_expect_success 'blame with pathspec outside sparse definition' '
# We compare sparse-checkout-err and sparse-index-err in
# `test_sparse_match`. Given we know they are the same, we
# only check the content of sparse-index-err here.
- test_cmp expect sparse-index-err
+ test_cmp expect sparse-index-err || return 1
done
'
@@ -1571,7 +1571,7 @@ test_expect_success 'sparse index is not expanded: blame' '
deep/deeper1/a \
deep/deeper1/deepest/a
do
- ensure_not_expanded blame $file
+ ensure_not_expanded blame $file || return 1
done
'
@@ -1907,7 +1907,7 @@ test_expect_success 'rm pathspec outside sparse definition' '
test_sparse_match test_must_fail git rm $file &&
test_sparse_match test_must_fail git rm --cached $file &&
test_sparse_match git rm --sparse $file &&
- test_sparse_match git status --porcelain=v2
+ test_sparse_match git status --porcelain=v2 || return 1
done &&
cat >folder1-full <<-EOF &&
diff --git a/t/t2407-worktree-heads.sh b/t/t2407-worktree-heads.sh
index 50815acd3e..019a40df2c 100755
--- a/t/t2407-worktree-heads.sh
+++ b/t/t2407-worktree-heads.sh
@@ -41,10 +41,10 @@ test_expect_success 'setup' '
test_expect_success 'refuse to overwrite: checked out in worktree' '
for i in 1 2 3 4
do
- test_must_fail git branch -f wt-$i HEAD 2>err
+ test_must_fail git branch -f wt-$i HEAD 2>err &&
grep "cannot force update the branch" err &&
- test_must_fail git branch -D wt-$i 2>err
+ test_must_fail git branch -D wt-$i 2>err &&
grep "Cannot delete branch" err || return 1
done
'
diff --git a/t/t5329-pack-objects-cruft.sh b/t/t5329-pack-objects-cruft.sh
index 8968f7a08d..303f7a5d84 100755
--- a/t/t5329-pack-objects-cruft.sh
+++ b/t/t5329-pack-objects-cruft.sh
@@ -29,7 +29,8 @@ basic_cruft_pack_tests () {
while read oid
do
path="$objdir/$(test_oid_to_path "$oid")" &&
- printf "%s %d\n" "$oid" "$(test-tool chmtime --get "$path")"
+ printf "%s %d\n" "$oid" "$(test-tool chmtime --get "$path")" ||
+ echo "object list generation failed for $oid"
done |
sort -k1
) >expect &&
@@ -232,7 +233,7 @@ test_expect_success 'cruft tags rescue tagged objects' '
while read oid
do
test-tool chmtime -1000 \
- "$objdir/$(test_oid_to_path $oid)"
+ "$objdir/$(test_oid_to_path $oid)" || exit 1
done <objects &&
test-tool chmtime -500 \
@@ -272,7 +273,7 @@ test_expect_success 'cruft commits rescue parents, trees' '
while read object
do
test-tool chmtime -1000 \
- "$objdir/$(test_oid_to_path $object)"
+ "$objdir/$(test_oid_to_path $object)" || exit 1
done <objects &&
test-tool chmtime +500 "$objdir/$(test_oid_to_path \
$(git rev-parse HEAD))" &&
@@ -345,7 +346,7 @@ test_expect_success 'expired objects are pruned' '
while read object
do
test-tool chmtime -1000 \
- "$objdir/$(test_oid_to_path $object)"
+ "$objdir/$(test_oid_to_path $object)" || exit 1
done <objects &&
keep="$(basename "$(ls $packdir/pack-*.pack)")" &&
diff --git a/t/t6429-merge-sequence-rename-caching.sh b/t/t6429-merge-sequence-rename-caching.sh
index e1ce919916..650b3cd14f 100755
--- a/t/t6429-merge-sequence-rename-caching.sh
+++ b/t/t6429-merge-sequence-rename-caching.sh
@@ -725,7 +725,7 @@ test_expect_success 'avoid assuming we detected renames' '
mkdir unrelated &&
for i in $(test_seq 1 10)
do
- >unrelated/$i
+ >unrelated/$i || exit 1
done &&
test_seq 2 10 >numbers &&
test_seq 12 20 >values &&