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

[PATCH] test-lib: write test results to test-results/<basename>-<pid>

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 13, 2009, 16:26 UTC
Message-ID
<3728317206182c4d4539f3d20b8441cb160e72e3.1236961524u.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1236961524u.git.johannes.schindelin@gmx.de>

The earlier code meant to attempt to strip everything except the test number, but only stripped the part starting with the last dash.

However, there is no reason why we should not use the whole basename.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	Even if this is not strictly necessary after Hannes' test cleanup, 
	it would still be nice.
	The alternative fix would be to use two percent signs instead of 
	just one.
 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 75b5a89..ccb5d0a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -477,7 +477,7 @@ test_done () {
 	trap - EXIT
 	test_results_dir="$TEST_DIRECTORY/test-results"
 	mkdir -p "$test_results_dir"
-	test_results_path="$test_results_dir/${0%-*}-$$"
+	test_results_path="$test_results_dir/${0%.sh}-$$"
 
 	echo "total $test_count" >> $test_results_path
 	echo "success $test_success" >> $test_results_path
-- 
1.6.2.240.g23c7
Next: Johannes Schindelin
Message 1 of 14 in “test-lib: write test results to test-results/<basename>-<pid>”
  1. test-lib: write test results to test-results/<basename>-<pid>Johannes Schindelin, Mar 13, 2009
  2. Johannes SchindelinMar 13, 2009
  3. SZEDER GáborMar 13, 2009
  4. SZEDER GáborMar 13, 2009
  5. Johannes SchindelinMar 14, 2009
  6. SZEDER GáborMar 14, 2009
  7. Johannes SchindelinMar 14, 2009
  8. SZEDER GáborMar 14, 2009
  9. Sverre RabbelierMar 14, 2009
  10. SZEDER GáborMar 14, 2009
  11. Johannes SchindelinMar 16, 2009
  12. SZEDER GáborMar 16, 2009
  13. Junio C HamanoMar 13, 2009
  14. Junio C HamanoMar 13, 2009

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.