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

[PATCH] test-lib: avoid full path to store test results

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 30, 2012, 04:12 UTC
Message-ID
<1351570377-894-1-git-send-email-felipe.contreras@gmail.com>
No reason to use the full path in case this is used externally.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 t/test-lib.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 514282c..5a3d665 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -389,7 +389,8 @@ test_done () {
 	then
 		test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results"
 		mkdir -p "$test_results_dir"
-		test_results_path="$test_results_dir/${0%.sh}-$$.counts"
+		base=${0##*/}
+		test_results_path="$test_results_dir/${base%.sh}-$$.counts"
 
 		cat >>"$test_results_path" <<-EOF
 		total $test_count
-- 
1.8.0
Next: Jeff King
Message 1 of 18 in “test-lib: avoid full path to store test results”
  1. test-lib: avoid full path to store test resultsFelipe Contreras, Oct 30, 2012
  2. Jeff KingOct 30, 2012
  3. Felipe ContrerasOct 30, 2012
  4. Jonathan NiederOct 30, 2012
  5. Felipe ContrerasOct 30, 2012
  6. Jonathan NiederOct 31, 2012
  7. Felipe ContrerasOct 31, 2012
  8. Jonathan NiederOct 31, 2012
  9. Felipe ContrerasOct 31, 2012
  10. Johannes SixtOct 31, 2012
  11. Felipe ContrerasOct 31, 2012
  12. Jeff KingNov 2, 2012
  13. Felipe ContrerasNov 2, 2012
  14. Jeff KingNov 2, 2012
  15. Elia PintoOct 30, 2012
  16. Jonathan NiederOct 30, 2012
  17. Elia PintoOct 30, 2012
  18. Stefano LattariniOct 31, 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.