Subject: [PATCH v4 0/3] Make test selection easier by specifying description substrings instead of just numeric counters

From: "Elijah Newren via GitGitGadget" <[email-masked]>
Date: Fri, 16 Oct 2020 19:28:49 +0000

This patch series enables me to change

 ./t9999-my-test.sh --run=1-3,5,17,19

into

 ./t9999-my-test.sh --run=setup,rename,symlink

and have it pick out tests with "setup", "rename", or "symlink" in their
description and run those. Saves me a lot of time, especially since numbers
for tests aren't readily accessible. The easiest way for me to get the
numbers corresponding to the tests I want to run, is to run all the tests
and look at the output to match up the descriptions with their numbers --
thus defeating the point of selecting just a subset of the tests to run in
the first place.

Changes since v3:

 * Added text to the README explaining what to do if the substring you want
   to search on includes a comma or whitespace (namely, use the '?' glob
   character instead)

Elijah Newren (3):
  test-lib: allow selecting tests by substring/glob with --run
  t6006, t6012: adjust tests to use 'setup' instead of synonyms
  test-lib: reduce verbosity of skipped tests

 t/README                     | 37 +++++++++++++++++++++++---------
 t/t0000-basic.sh             | 41 ++++++++++++++++++++++--------------
 t/t6006-rev-list-format.sh   |  2 +-
 t/t6012-rev-list-simplify.sh |  2 +-
 t/test-lib.sh                | 17 +++++++++------
 5 files changed, 64 insertions(+), 35 deletions(-)

base-commit: d98273ba77e1ab9ec755576bc86c716a97bf59d7
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-878%2Fnewren%2Ftest-selection-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-878/newren/test-selection-v4
Pull-Request: https://github.com/git/git/pull/878

Range-diff vs v3:

 1:  9c8b6a1a94 ! 1:  8f5d4ad318 test-lib: allow selecting tests by substring/glob with --run
     @@ t/README: For an individual test suite --run could be used to specify that
      +numbers separated with a dash and matches a range of tests with both
      +ends been included.  You may omit the first or the second number to
      +mean "from the first test" or "up to the very last test" respectively.
     ++
     ++The argument to --run is split on commas and whitespace into separate
     ++strings, numbers, and ranges, and picks all tests that match any of
     ++the individual selection criteria.  If the substring of the
     ++description text that you want to match includes a comma or space, use
     ++the glob character '?' instead.  For example --run='unnecessary?update
     ++timing' would match on all tests that match either the glob
     ++*unnecessary?update* or the glob *timing*.
       
       If --run starts with an unprefixed number or range the initial
       set of tests to run is empty. If the first item starts with '!'
 2:  6479d73603 = 2:  bbae029cc8 t6006, t6012: adjust tests to use 'setup' instead of synonyms
 3:  24f6febde6 = 3:  0e1a1125f7 test-lib: reduce verbosity of skipped tests

-- 
gitgitgadget