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

Re: [PATCH] test-lib: add the test_pause convenience function

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 17, 2012, 19:15 UTC
Message-ID
<7vboq2rvhl.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4F152F7C.9020902@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
> I really don't care deeply about the name, so test_pause is absolutely
> ok for me. I added some documentation in t/README too and made it an
> error when --verbose is not used.
I don't care about the name at all, either.

What I cared was more about the hardcoded "bash". Believe it or not, there are boxes that lack it, and there are people who prefer other shells for their interactive work. At the very least, invoke "$SHELL_PATH" instead of bash there, perhaps?

If we wanted to allow an ad-hoc debugging of test scripts to sprinkle "test_pause $cmd", we might need to do something like:

> +test_pause () {
> +	if test "$verbose" = t; then
> +		bash <&6 >&3 2>&4
		${1-"$SHELL_PATH"} <&6 >&3 2>&4
> +	else
> +		error >&5 "test_pause requires --verbose"
> +	fi
> +}

but I do not think that is worth it. The debugging developer should easily be able to run gdb or whatever from the interactive shell you are giving here.

Previous: Jens LehmannNext: Jens Lehmann
Message 11 of 12 in “test-lib: add the test_bash convenience function”
  1. test-lib: add the test_bash convenience functionJens Lehmann, Jan 15, 2012
  2. Jeff KingJan 15, 2012
  3. test_interactive: interactive debugging in test scriptsPete Wyckoff, Jan 16, 2012
  4. Jens LehmannJan 16, 2012
  5. Jeff KingJan 16, 2012
  6. Jens LehmannJan 16, 2012
  7. Pete WyckoffJan 16, 2012
  8. Jeff KingJan 16, 2012
  9. Junio C HamanoJan 16, 2012
  10. test-lib: add the test_pause convenience functionJens Lehmann, Jan 17, 2012
  11. Junio C HamanoJan 17, 2012
  12. test-lib: add the test_pause convenience functionJens Lehmann, Jan 17, 2012

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.