]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0000-basic.sh
test-lib: allow selecting tests by substring/glob with --run
authorElijah Newren <newren@gmail.com>
Sun, 18 Oct 2020 00:23:45 +0000 (00:23 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Oct 2020 20:18:36 +0000 (13:18 -0700)
commitf21ac368f15b0a4df301c65a9a603c4e57277f57
treea5d17cd5a35192536fe89c55235bbf2b2faae393
parentd4a392452e292ff924e79ec8458611c0f679d6d4
test-lib: allow selecting tests by substring/glob with --run

Many of our test scripts have several "setup" tests.  It's a lot easier
to say

   ./t0050-filesystem.sh --run=setup,9

in order to run all the setup tests as well as test #9, than it is to
track down what all the setup tests are and enter all their numbers in
the list.  Also, I often find myself wanting to run just one or a couple
tests from the test file, but I don't know the numbering of any of the
tests -- to get it I either have to first run the whole test file (or
start counting by hand or figure out some other clever but non-obvious
tricks).  It's really convenient to be able to just look at the test
description(s) and then run

   ./t6416-recursive-corner-cases.sh --run=symlink

or

   ./t6402-merge-rename.sh --run='setup,unnecessary update'

Add such an ability to test selection which relies on merely matching
against the test description.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/README
t/t0000-basic.sh
t/test-lib.sh