All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf-lib: split starting the test from the execution
@ 2013-09-17 12:10 Thomas Gummerer
  2013-09-17 12:10 ` [PATCH 2/2] perf-lib: add test_perf_cleanup target Thomas Gummerer
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Gummerer @ 2013-09-17 12:10 UTC (permalink / raw)
  To: git; +Cc: trast, gitster, t.gummerer

Separate the execution part to make future changes to the tests simpler.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
 t/perf/perf-lib.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index c61d535..95e483c 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -148,13 +148,8 @@ exit $ret' >&3 2>&4
 	return "$eval_ret"
 }
 
-
-test_perf () {
+perf_test_ () {
 	test_start_
-	test "$#" = 3 && { test_prereq=$1; shift; } || test_prereq=
-	test "$#" = 2 ||
-	error "bug in the test script: not 2 or 3 parameters to test-expect-success"
-	export test_prereq
 	if ! test_skip "$@"
 	then
 		base=$(basename "$0" .sh)
@@ -191,6 +186,14 @@ test_perf () {
 	test_finish_
 }
 
+test_perf () {
+	test "$#" = 3 && { test_prereq=$1; shift; } || test_prereq=
+	test "$#" = 2 ||
+	error "bug in the test script: not 2 or 3 parameters to test-expect-success"
+	export test_prereq
+	perf_test_ "$1" "$2"
+}
+
 # We extend test_done to print timings at the end (./run disables this
 # and does it after running everything)
 test_at_end_hook_ () {
-- 
1.8.3.4.1238.ga800761

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-09-23 21:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 12:10 [PATCH 1/2] perf-lib: split starting the test from the execution Thomas Gummerer
2013-09-17 12:10 ` [PATCH 2/2] perf-lib: add test_perf_cleanup target Thomas Gummerer
2013-09-17 17:43   ` Junio C Hamano
2013-09-19 11:42     ` Thomas Gummerer
2013-09-19 17:19       ` Junio C Hamano
2013-09-19 19:52         ` Junio C Hamano
2013-09-19 20:11           ` Junio C Hamano
2013-09-20 22:14           ` Thomas Gummerer
2013-09-23 21:08           ` [PATCH v2 0/3] Add cleanup action to perf-lib Thomas Gummerer
2013-09-23 21:08             ` [PATCH v2 1/3] test-lib: introduce "modern" style tests Thomas Gummerer
2013-09-23 21:08             ` [PATCH v2 2/3] perf-lib: add cleanup option Thomas Gummerer
2013-09-23 21:08             ` [PATCH v2 3/3] p0003-index.sh: add perf test for the index formats Thomas Gummerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.