git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] test-lib: introduce the '-V' short option for '--verbose-log'

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Oct 29, 2018, 12:13 UTC
Message-ID
<20181029121359.7323-1-szeder.dev@gmail.com>

'--verbose-log' is one of the most useful and thus most frequently used test options, but due to its length it's a pain to type on the command line.

Let's introduce the corresponding short option '-V' to save some keystrokes.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---

Or it could be '-L', to emphasize the "log" part of the long option, I don't really care.

 t/README      | 1 +
 t/test-lib.sh | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/README b/t/README
index 8847489640..2e9bef2852 100644
--- a/t/README
+++ b/t/README
@@ -154,6 +154,7 @@ appropriately before running "make".
 	As the names depend on the tests' file names, it is safe to
 	run the tests with this option in parallel.
 
+-V::
 --verbose-log::
 	Write verbose output to the same logfile as `--tee`, but do
 	_not_ write it to stdout. Unlike `--tee --verbose`, this option
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 897e6fcc94..47a99aa0ed 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -67,7 +67,7 @@ case "$GIT_TEST_TEE_STARTED, $* " in
 done,*)
 	# do not redirect again
 	;;
-*' --tee '*|*' --va'*|*' --verbose-log '*)
+*' --tee '*|*' --va'*|*' -V '*|*' --verbose-log '*)
 	mkdir -p "$TEST_OUTPUT_DIRECTORY/test-results"
 	BASE="$TEST_OUTPUT_DIRECTORY/test-results/$(basename "$0" .sh)"
 
@@ -316,7 +316,7 @@ do
 			echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
 		fi
 		shift ;;
-	--verbose-log)
+	-V|--verbose-log)
 		verbose_log=t
 		shift ;;
 	*)
-- 
2.19.1.723.g6817e59acc
Next: Jeff King
Message 1 of 4 in “test-lib: introduce the '-V' short option for '--verbose-log'”
  1. test-lib: introduce the '-V' short option for '--verbose-log'SZEDER Gábor, Oct 29, 2018
  2. Jeff KingOct 29, 2018
  3. SZEDER GáborOct 29, 2018
  4. Jeff KingOct 29, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.