All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Modified test-lib.sh to output stats to /tmp/git-test-results
@ 2008-06-08 14:04 Sverre Rabbelier
  2008-06-08 14:04 ` [PATCH 2/3] A simple script to parse the results from the testcases Sverre Rabbelier
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sverre Rabbelier @ 2008-06-08 14:04 UTC (permalink / raw)
  To: Git list; +Cc: Sverre Rabbelier

From: Sverre Rabbelier <srabbelier@gmail.com>

This change is needed order to aggregate data on the test run later on.
Because writing to the current directory is not possible, we write to /tmp/.
Suggestions for a better location are welcome.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
---
 t/test-lib.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 7a8bd27..4585fde 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -152,6 +152,7 @@ test_failure=0
 test_count=0
 test_fixed=0
 test_broken=0
+test_success=0
 
 die () {
 	echo >&5 "FATAL: Unexpected exit with code $?"
@@ -193,6 +194,7 @@ test_tick () {
 
 test_ok_ () {
 	test_count=$(expr "$test_count" + 1)
+	test_success=$(expr "$test_success" + 1)
 	say_color "" "  ok $test_count: $@"
 }
 
@@ -353,6 +355,14 @@ test_create_repo () {
 
 test_done () {
 	trap - exit
+	test_results_path="../test-results"
+
+	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
-- 
1.5.5.1.214.g82ce2.dirty

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

end of thread, other threads:[~2008-06-09  0:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-08 14:04 [PATCH 1/3] Modified test-lib.sh to output stats to /tmp/git-test-results Sverre Rabbelier
2008-06-08 14:04 ` [PATCH 2/3] A simple script to parse the results from the testcases Sverre Rabbelier
2008-06-08 14:04 ` [PATCH 3/3] Hook up the result aggregation in the test makefile Sverre Rabbelier
2008-06-08 14:42 ` [PATCH 1/3] Modified test-lib.sh to output stats to /tmp/git-test-results Jakub Narebski
2008-06-08 14:45   ` Sverre Rabbelier
2008-06-08 18:53     ` Junio C Hamano
2008-06-08 19:02       ` Sverre Rabbelier
2008-06-08 20:59         ` Junio C Hamano
2008-06-09  0:44           ` [PATCH 4/4] Make test-lib warn if the directory changes Sverre Rabbelier

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.