test-lib: add a --invert-exit-code switch
commit46fb057aaad2cfcbf6cdf409fcf241a362ad77b3
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 27 Jul 2022 23:13:32 +0000 (28 01:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Jul 2022 23:35:40 +0000 (27 16:35 -0700)
treec2a2cd16b34ffdbec463537947c14697e50772d3
parent25c2351d85bf19cfd0b19e2de8468c3604897dcf
test-lib: add a --invert-exit-code switch

Add the ability to have those tests that fail return 0, and those
tests that succeed return 1. This is useful e.g. to run "--stress"
tests on tests that fail 99% of the time on some setup, i.e. to smoke
out the flaky run which yielded success.

In a subsequent commit a new SANITIZE=leak mode will make use of this.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0000-basic.sh
t/test-lib.sh