diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2013-09-17 14:10:41 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-19 13:05:00 -0700 |
commit | 52b8aef8a34adc1e7215e528900593aee983d23d (patch) | |
tree | 1311113b00bf71c656486debaa40324967637f85 | |
parent | 79e46c9fed837c565eac8d81448641d6b944a928 (diff) | |
download | git-52b8aef8a34adc1e7215e528900593aee983d23d.tar.gz |
perf-lib: split starting the test from the execution
Separate the execution part to make future changes to the tests simpler.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | t/perf/perf-lib.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index f4eecaa171..8f92eb8889 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_ () { |