# [PATCH] Only run aggregate-results over actual counts

5 messages from 2010-06-15 to 2010-07-16. Participants: Thomas Rast, Sverre Rabbelier, Ævar Arnfjörð Bjarmason, Junio C Hamano.
Thread: https://gitlist.dev/t/24124

## Thomas Rast, 2010-06-15 21:36

Subject: [PATCH] Only run aggregate-results over actual counts
Message-ID: <e10dd00b7a2064c71c9a509e2a7e82c935a60441.1276637243.git.trast@student.ethz.ch>
URL: https://gitlist.dev/e/e10dd00b7a2064c71c9a509e2a7e82c935a60441.1276637243.git.trast%40student.ethz.ch

```
The current make target 'aggregate-results' scanned all files matching
test-results/t*-*.  Normally these are only the test counts (and the
exit values, which are ignored), but with --tee the suite also dumps
all output.  Furthermore, with --verbose t1450 contains several lines
starting with "broken link from ..." which matches the criteria used
by aggregate-results.sh.

Rename the counts output files to *.counts, and only scan those.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

Did this ever work?  Or was just nobody crazy enough to run all tests
with --tee --valgrind?

 t/Makefile    |    2 +-
 t/test-lib.sh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/Makefile b/t/Makefile
index f9de24b..cf5f9e2 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -36,7 +36,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	for f in test-results/t*-*; do \
+	for f in test-results/t*-*.counts; do \
 		echo "$$f"; \
 	done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 37987d7..7e2cd7d 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -547,7 +547,7 @@ test_done () {
 	GIT_EXIT_OK=t
 	test_results_dir="$TEST_DIRECTORY/test-results"
 	mkdir -p "$test_results_dir"
-	test_results_path="$test_results_dir/${0%.sh}-$$"
+	test_results_path="$test_results_dir/${0%.sh}-$$.counts"
 
 	echo "total $test_count" >> $test_results_path
 	echo "success $test_success" >> $test_results_path
-- 
1.7.1.608.g80d39f

```

## Sverre Rabbelier, 2010-06-15 21:44

Subject: Re: [PATCH] Only run aggregate-results over actual counts
Message-ID: <AANLkTil4HfoMPD4ds0uXRPruYrz4CtpAy-4TfEk0E_yT@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTil4HfoMPD4ds0uXRPruYrz4CtpAy-4TfEk0E_yT%40mail.gmail.com
In-Reply-To: <e10dd00b7a2064c71c9a509e2a7e82c935a60441.1276637243.git.trast@student.ethz.ch>

```
Heya,

On Tue, Jun 15, 2010 at 23:36, Thomas Rast <trast@student.ethz.ch> wrote:
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>

Fwiw:

Acked-by: Sverre Rabbelier <srabbelier@gmail.com>

-- 
Cheers,

Sverre Rabbelier

```

## Thomas Rast, 2010-07-16 09:37

Subject: [PATCH resend] Only run aggregate-results over actual counts
Message-ID: <3ce03e702e005a978d3229fa74860d6529296921.1279272868.git.trast@student.ethz.ch>
URL: https://gitlist.dev/e/3ce03e702e005a978d3229fa74860d6529296921.1279272868.git.trast%40student.ethz.ch
In-Reply-To: <AANLkTil4HfoMPD4ds0uXRPruYrz4CtpAy-4TfEk0E_yT@mail.gmail.com>

```
The current make target 'aggregate-results' scanned all files matching
test-results/t*-*.  Normally these are only the test counts (and the
exit values, which are ignored), but with --tee the suite also dumps
all output.  Furthermore, with --verbose t1450 contains several lines
starting with "broken link from ..." which matches the criteria used
by aggregate-results.sh.

Rename the counts output files to *.counts, and only scan those.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
---
 t/Makefile    |    2 +-
 t/test-lib.sh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/Makefile b/t/Makefile
index f9de24b..cf5f9e2 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -36,7 +36,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	for f in test-results/t*-*; do \
+	for f in test-results/t*-*.counts; do \
 		echo "$$f"; \
 	done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ac496aa..83a5a84 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -635,7 +635,7 @@ test_done () {
 	GIT_EXIT_OK=t
 	test_results_dir="$TEST_DIRECTORY/test-results"
 	mkdir -p "$test_results_dir"
-	test_results_path="$test_results_dir/${0%.sh}-$$"
+	test_results_path="$test_results_dir/${0%.sh}-$$.counts"
 
 	echo "total $test_count" >> $test_results_path
 	echo "success $test_success" >> $test_results_path
-- 
1.7.2.rc3.259.g43154

```

## Ævar Arnfjörð Bjarmason, 2010-07-16 14:27

Subject: Re: [PATCH resend] Only run aggregate-results over actual counts
Message-ID: <AANLkTin1BQTWj7AiEuWibanhVKu6UBJmn1iKEF-DB-s9@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTin1BQTWj7AiEuWibanhVKu6UBJmn1iKEF-DB-s9%40mail.gmail.com
In-Reply-To: <3ce03e702e005a978d3229fa74860d6529296921.1279272868.git.trast@student.ethz.ch>

```
On Fri, Jul 16, 2010 at 09:37, Thomas Rast <trast@student.ethz.ch> wrote:
> The current make target 'aggregate-results' scanned all files matching
> test-results/t*-*.  Normally these are only the test counts (and the
> exit values, which are ignored), but with --tee the suite also dumps
> all output.  Furthermore, with --verbose t1450 contains several lines
> starting with "broken link from ..." which matches the criteria used
> by aggregate-results.sh.
>
> Rename the counts output files to *.counts, and only scan those.
>
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> Acked-by: Sverre Rabbelier <srabbelier@gmail.com>

Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>

> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -635,7 +635,7 @@ test_done () {
>        GIT_EXIT_OK=t
>        test_results_dir="$TEST_DIRECTORY/test-results"
>        mkdir -p "$test_results_dir"
> -       test_results_path="$test_results_dir/${0%.sh}-$$"
> +       test_results_path="$test_results_dir/${0%.sh}-$$.counts"
>
>        echo "total $test_count" >> $test_results_path
>        echo "success $test_success" >> $test_results_path

For Junio: FYI this bumps into my "test-lib: Don't write test-results
when HARNESS_ACTIVE" patch in flight. The fixup is trivial though.

```

## Junio C Hamano, 2010-07-16 20:26

Subject: Re: [PATCH resend] Only run aggregate-results over actual counts
Message-ID: <7vfwzjrx4g.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfwzjrx4g.fsf%40alter.siamese.dyndns.org
In-Reply-To: <3ce03e702e005a978d3229fa74860d6529296921.1279272868.git.trast@student.ethz.ch>

```
Thanks.

```
