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

Re: [PATCH v2 2/3] Introduce a performance testing framework

From
Jeff King <peff@peff.net>
Date
Feb 17, 2012, 07:45 UTC
Message-ID
<20120217074543.GA25213@sigill.intra.peff.net>
In-Reply-To
<5e712370fcfe32832998c085fdf6b5a7c4e7d64b.1329428159.git.trast@student.ethz.ch>
On Thu, Feb 16, 2012 at 10:41:14PM +0100, Thomas Rast wrote:
Show 5 quoted lines
> +	if test $eval_ret = 0 || test -n "$expecting_failure"
> +	then
> +		test_eval_ "$test_cleanup"
> +		source ./test_vars || error "failed to load updated environment"
> +	fi

"source" is a bash-ism (actually, it is a csh-ism as far as I know, but perhaps it predates even that). The correct POSIX spelling is ".".

After tweaking this line, the suite seems to run fine for me with dash as /bin/sh. Patch is below for your convenience.

-Peff
---
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 07e9b09..629d7d5 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -135,7 +135,7 @@ exit $ret' >&3 2>&4
 	if test $eval_ret = 0 || test -n "$expecting_failure"
 	then
 		test_eval_ "$test_cleanup"
-		source ./test_vars || error "failed to load updated environment"
+		. ./test_vars || error "failed to load updated environment"
 	fi
 	if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"; then
 		echo ""
Previous: Thomas RastNext: Thomas Rast
Message 18 of 19 in “Adding a performance framework”
  1. 0/3 Adding a performance frameworkThomas Rast, Feb 16, 2012
  2. 1/3 Move the user-facing test library to test-lib-functions.shThomas Rast, Feb 16, 2012
  3. Junio C HamanoFeb 16, 2012
  4. Thomas RastFeb 17, 2012
  5. 0/3 Thomas Rast, Feb 17, 2012
  6. 1/3 Move the user-facing test library to test-lib-functions.shThomas Rast, Feb 17, 2012
  7. 2/3 Introduce a performance testing frameworkThomas Rast, Feb 17, 2012
  8. 3/3 Add a performance test for git-grepThomas Rast, Feb 17, 2012
  9. Junio C HamanoFeb 17, 2012
  10. Junio C HamanoFeb 17, 2012
  11. Jeff KingFeb 18, 2012
  12. Junio C HamanoFeb 18, 2012
  13. Jeff KingFeb 18, 2012
  14. SIGPIPE handling (Re: [PATCH v3 0/3])Jonathan Nieder, Feb 18, 2012
  15. Jonathan NiederFeb 18, 2012
  16. Jeff KingFeb 18, 2012
  17. 2/3 Introduce a performance testing frameworkThomas Rast, Feb 16, 2012
  18. Jeff KingFeb 17, 2012
  19. 3/3 Add a performance test for git-grepThomas Rast, Feb 16, 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.