Skip to content

Commit e537784

Browse files
committed
Merge branch 'jk/fail-prereq-testfix'
GIT_TEST_FAIL_PREREQS is a mechanism to skip test pieces with prerequisites to catch broken tests that depend on the side effects of optional pieces, but did not work at all when negative prerequisites were involved. * jk/fail-prereq-testfix: t: annotate !PTHREADS tests with !FAIL_PREREQS
2 parents 2744383 + 27d578d commit e537784

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

t/t5300-pack-object.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,8 @@ test_expect_success 'index-pack --strict <pack> works in non-repo' '
427427
test_path_is_file foo.idx
428428
'
429429

430-
test_expect_success !PTHREADS 'index-pack --threads=N or pack.threads=N warns when no pthreads' '
430+
test_expect_success !PTHREADS,!FAIL_PREREQS \
431+
'index-pack --threads=N or pack.threads=N warns when no pthreads' '
431432
test_must_fail git index-pack --threads=2 2>err &&
432433
grep ^warning: err >warnings &&
433434
test_line_count = 1 warnings &&
@@ -445,7 +446,8 @@ test_expect_success !PTHREADS 'index-pack --threads=N or pack.threads=N warns wh
445446
grep -F "no threads support, ignoring pack.threads" err
446447
'
447448

448-
test_expect_success !PTHREADS 'pack-objects --threads=N or pack.threads=N warns when no pthreads' '
449+
test_expect_success !PTHREADS,!FAIL_PREREQS \
450+
'pack-objects --threads=N or pack.threads=N warns when no pthreads' '
449451
git pack-objects --threads=2 --stdout --all </dev/null >/dev/null 2>err &&
450452
grep ^warning: err >warnings &&
451453
test_line_count = 1 warnings &&

t/t7810-grep.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,8 @@ do
969969
"
970970
done
971971

972-
test_expect_success !PTHREADS 'grep --threads=N or pack.threads=N warns when no pthreads' '
972+
test_expect_success !PTHREADS,!FAIL_PREREQS \
973+
'grep --threads=N or pack.threads=N warns when no pthreads' '
973974
git grep --threads=2 Hello hello_world 2>err &&
974975
grep ^warning: err >warnings &&
975976
test_line_count = 1 warnings &&

0 commit comments

Comments
 (0)