Skip to content

Commit

Permalink
perf-lib: fix start/stop of perf tests
Browse files Browse the repository at this point in the history
ae75342 test-lib: rearrange start/end of test_expect_* and test_skip
changed the way tests are started/stopped, but did not update the perf
tests.  They were therefore giving the wrong output, because of the
wrong test count.  Fix this by starting and stopping the tests
correctly.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Gummerer authored and Junio C Hamano committed Jun 30, 2013
1 parent ad0e623 commit 62a23c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/perf/perf-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ exit $ret' >&3 2>&4


test_perf () {
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"
Expand Down Expand Up @@ -187,7 +188,7 @@ test_perf () {
base="$perf_results_dir"/"$perf_results_prefix$(basename "$0" .sh)"."$test_count"
"$TEST_DIRECTORY"/perf/min_time.perl test_time.* >"$base".times
fi
echo >&3 ""
test_finish_
}

# We extend test_done to print timings at the end (./run disables this
Expand Down

0 comments on commit 62a23c9

Please sign in to comment.