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

[PATCH 1/2] perf: load test-lib-functions from the correct directory

From
Thomas Rast <trast@student.ethz.ch>
Date
Mar 8, 2012, 08:54 UTC
Message-ID
<14709b4345420da36a9152904bef4cc4503f78e4.1331196679.git.trast@student.ethz.ch>
In-Reply-To
<7v7gyvkh84.fsf@alter.siamese.dyndns.org>

Loading it in the subshells still referred to $TEST_DIRECTORY/.., which was only correct in preliminary versions of perf-lib.sh

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

This and the next one fix two small bugs in the perf test suite. They don't affect anyone so far, which is why they went unnoticed.

 t/perf/p0000-perf-lib-sanity.sh |    5 +++++
 t/perf/perf-lib.sh              |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/perf/p0000-perf-lib-sanity.sh b/t/perf/p0000-perf-lib-sanity.sh
index 2ca4aac..f8dd536 100755
--- a/t/perf/p0000-perf-lib-sanity.sh
+++ b/t/perf/p0000-perf-lib-sanity.sh
@@ -38,4 +38,9 @@ test_expect_success 'test_export works with weird vars' '
 	test "$bar" = "weird # variable"
 '
 
+test_perf 'test-lib-functions correctly loaded in subshells' '
+	: >a &&
+	test_path_is_file a
+'
+
 test_done
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 2a5e1f3..bcc0131 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -119,7 +119,7 @@ test_run_perf_ () {
 	test_export_="test_cleanup"
 	export test_cleanup test_export_
 	/usr/bin/time -f "%E %U %S" -o test_time.$i "$SHELL" -c '
-. '"$TEST_DIRECTORY"/../test-lib-functions.sh'
+. '"$TEST_DIRECTORY"/test-lib-functions.sh'
 test_export () {
 	[ $# != 0 ] || return 0
 	test_export_="$test_export_\\|$1"
-- 
1.7.9.3.556.g7eb2d
Previous: Junio C HamanoNext: Thomas Rast
Message 7 of 22 in “[ANNOUNCE] Git 1.7.10-rc0”
  1. Junio C HamanoMar 8, 2012
  2. Jeff KingMar 8, 2012
  3. Junio C HamanoMar 8, 2012
  4. Junio C HamanoMar 8, 2012
  5. Jeff KingMar 8, 2012
  6. Junio C HamanoMar 8, 2012
  7. 1/2 perf: load test-lib-functions from the correct directoryThomas Rast, Mar 8, 2012
  8. 2/2 perf: export some important test-lib variablesThomas Rast, Mar 8, 2012
  9. Ramkumar RamachandraSep 17, 2012
  10. Thomas RastMar 8, 2012
  11. Nguyen Thai Ngoc DuyMar 8, 2012
  12. Junio C HamanoMar 8, 2012
  13. Jakub NarebskiMar 8, 2012
  14. Junio C HamanoMar 8, 2012
  15. Jakub NarebskiMar 8, 2012
  16. Junio C HamanoMar 8, 2012
  17. Tim HeniganMar 8, 2012
  18. Junio C HamanoMar 8, 2012
  19. RelNotes: noted the addition of contrib/diffallTim Henigan, Mar 9, 2012
  20. Junio C HamanoMar 9, 2012
  21. Tim HeniganMar 9, 2012
  22. Marc BranchaudMar 8, 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.