summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5d9de1)
raw | patch | inline | side by side (parent: d5d9de1)
author | Johannes Sixt <j6t@kdbg.org> | |
Thu, 5 Feb 2009 20:20:56 +0000 (21:20 +0100) | ||
committer | Johannes Sixt <j6t@kdbg.org> | |
Thu, 19 Mar 2009 20:47:14 +0000 (21:47 +0100) |
Since the test case counter was incremented very late, there were a few
users of the counter had to do their own incrementing. Now we increment it
early and simplify these users.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
users of the counter had to do their own incrementing. Now we increment it
early and simplify these users.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
t/t4013-diff-various.sh | patch | blob | history | |
t/t5515-fetch-merge-logic.sh | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
index 9cd5a6e68563aede0e69270421b56d1904c34165..426e64e828cfe6efaa7281f30fa8d4e676265107 100755 (executable)
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
'' | '#'*) continue ;;
esac
test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
- cnt=`expr $test_count + 1`
- pfx=`printf "%04d" $cnt`
+ pfx=`printf "%04d" $test_count`
expect="$TEST_DIRECTORY/t4013/diff.$test"
actual="$pfx-diff.$test"
index 1f4608d8ba4748a2bd5c7a3d5a75a04364e8f646..dbb927dec8ea9f40e8e106f416c276f1b6a07868 100755 (executable)
'' | '#'*) continue ;;
esac
test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
- cnt=`expr $test_count + 1`
- pfx=`printf "%04d" $cnt`
+ pfx=`printf "%04d" $test_count`
expect_f="$TEST_DIRECTORY/t5515/fetch.$test"
actual_f="$pfx-fetch.$test"
expect_r="$TEST_DIRECTORY/t5515/refs.$test"
diff --git a/t/test-lib.sh b/t/test-lib.sh
index bd8cba1ce2e1a1f730553095db3df6de9f6702d4..ace440cb36d0ffa65954331a9480947cac09230e 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
# the text_expect_* functions instead.
test_ok_ () {
- test_count=$(($test_count + 1))
test_success=$(($test_success + 1))
say_color "" " ok $test_count: $@"
}
test_failure_ () {
- test_count=$(($test_count + 1))
test_failure=$(($test_failure + 1))
say_color error "FAIL $test_count: $1"
shift
}
test_known_broken_ok_ () {
- test_count=$(($test_count+1))
test_fixed=$(($test_fixed+1))
say_color "" " FIXED $test_count: $@"
}
test_known_broken_failure_ () {
- test_count=$(($test_count+1))
test_broken=$(($test_broken+1))
say_color skip " still broken $test_count: $@"
}
}
test_skip () {
+ test_count=$(($test_count+1))
to_skip=
for skp in $GIT_SKIP_TESTS
do
- case $this_test.$(($test_count+1)) in
+ case $this_test.$test_count in
$skp)
to_skip=t
esac
case "$to_skip" in
t)
say_color skip >&3 "skipping test: $@"
- test_count=$(($test_count+1))
say_color skip "skip $test_count: $1"
: true
;;
then
# Announce the script to reduce confusion about the
# test output that follows.
- say_color "" " run $(($test_count+1)): $descr ($*)"
+ say_color "" " run $test_count: $descr ($*)"
# Run command; redirect its stderr to &4 as in
# test_run_, but keep its stdout on our stdout even in
# non-verbose mode.