summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 218bf69)
raw | patch | inline | side by side (parent: 218bf69)
author | Sverre Rabbelier <srabbelier@gmail.com> | |
Sun, 8 Jun 2008 14:04:33 +0000 (16:04 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Jun 2008 22:07:27 +0000 (15:07 -0700) |
This change is needed order to aggregate data on the test run later on.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/Makefile | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
diff --git a/t/Makefile b/t/Makefile
index c6a60ab165b504393d3ecd5db1ea9d241687be05..dfa90ace1aad38119e681300730e2170ee3796c5 100644 (file)
--- a/t/Makefile
+++ b/t/Makefile
@echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
clean:
- $(RM) -r 'trash directory'
+ $(RM) -r 'trash directory' test-results
# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
full-svn-test:
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 7a8bd27abc79a43a9248c3bcee8d6a3670e30fe3..2ad3f4a126cc70dad6d9d65aa2b322c511c9634f 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
test_count=0
test_fixed=0
test_broken=0
+test_success=0
die () {
echo >&5 "FATAL: Unexpected exit with code $?"
test_ok_ () {
test_count=$(expr "$test_count" + 1)
+ test_success=$(expr "$test_success" + 1)
say_color "" " ok $test_count: $@"
}
test_done () {
trap - exit
+ test_results_dir="$TEST_DIRECTORY/test-results"
+ mkdir -p "$test_results_dir"
+ test_results_path="$test_results_dir/${0%-*}-$$"
+
+ echo "total $test_count" >> $test_results_path
+ echo "success $test_success" >> $test_results_path
+ echo "fixed $test_fixed" >> $test_results_path
+ echo "broken $test_broken" >> $test_results_path
+ echo "failed $test_failure" >> $test_results_path
+ echo "" >> $test_results_path
if test "$test_fixed" != 0
then
# Test the binaries we have just built. The tests are kept in
# t/ subdirectory and are run in trash subdirectory.
-PATH=$(pwd)/..:$PATH
+TEST_DIRECTORY=$(pwd)
+PATH=$TEST_DIRECTORY/..:$PATH
GIT_EXEC_PATH=$(pwd)/..
GIT_TEMPLATE_DIR=$(pwd)/../templates/blt
unset GIT_CONFIG