Skip to content

Make test selection easier by specifying description substrings instead of just numeric counters

Elijah Newren via GitGitGadget git 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 0 repliesNew
  2. v53 patches 2 repliesSuperseded
  3. v43 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches6 repliesSuperseded
v23 patches27 repliesSuperseded
v13 patches10 repliesSuperseded

Changes in v6 from the cover letter

* Update comment to match the code (selectors are now only split on commas, not on whitespace)

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3test-lib: allow selecting tests by substring/glob with --runt/README t/t0000-basic.sh t/test-lib.sh+74 -470 replies
2/3t6006, t6012: adjust tests to use 'setup' instead of synonymst/t6006-rev-list-format.sh t/t6012-rev-list-simplify.sh+2 -20 replies
3/3test-lib: reduce verbosity of skipped testst/test-lib.sh+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/3] Make test selection easier by specifying description substrings instead of just numeric counters

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 v5:

* Update comment to match the code (selectors are now only split on commas, not on whitespace)

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                     | 48 ++++++++++++++++++++------------
 t/t0000-basic.sh             | 53 +++++++++++++++++++++---------------
 t/t6006-rev-list-format.sh   |  2 +-
 t/t6012-rev-list-simplify.sh |  2 +-
 t/test-lib.sh                | 21 ++++++++------
 5 files changed, 76 insertions(+), 50 deletions(-)

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

Range-diff vs v5:

1: 389c2c171a ! 1: 0355c88882 test-lib: allow selecting tests by substring/glob with --run

     @@ t/test-lib.sh: match_pattern_list () {
       	title="$1"
       	shift
       	arg="$1"
     -@@ t/test-lib.sh: match_test_selector_list () {
     + 	shift
     + 	test -z "$1" && return 0
       
     - 	# Both commas and whitespace are accepted as separators.
     +-	# Both commas and whitespace are accepted as separators.
     ++	# Commas are accepted as separators.
       	OLDIFS=$IFS
      -	IFS=' 	,'
      +	IFS=','
 2:  7c7a3d9a34 = 2:  3cc9abf461 t6006, t6012: adjust tests to use 'setup' instead of synonyms
 3:  01494bc0ba = 3:  0af7835487 test-lib: reduce verbosity of skipped tests
Signature · 1 line
gitgitgadget