git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v2 0/2] test: cleanups of aggregate-results.sh
@ 2023-03-09 17:30 Felipe Contreras
  2023-03-09 17:30 ` [PATCH v2 1/2] test: simplify counts aggregation Felipe Contreras
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Felipe Contreras @ 2023-03-09 17:30 UTC (permalink / raw)
  To: git; +Cc: Ævar Arnfjörð Bjarmason, Eric Wong,
	Felipe Contreras

Basically $title.

Since v1 I'm now passing the directory, instead of the file pattern as
Ævar suggested.

Also, while at it, let's silence the print of the command.

Felipe Contreras (2):
  test: simplify counts aggregation
  test: don't print aggregate-results command

 contrib/subtree/t/Makefile | 4 +---
 t/Makefile                 | 4 +---
 t/aggregate-results.sh     | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

-- 
2.39.2


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

* [PATCH v2 1/2] test: simplify counts aggregation
  2023-03-09 17:30 [PATCH v2 0/2] test: cleanups of aggregate-results.sh Felipe Contreras
@ 2023-03-09 17:30 ` Felipe Contreras
  2023-03-09 17:30 ` [PATCH v2 2/2] test: don't print aggregate-results command Felipe Contreras
  2023-03-10 19:25 ` [PATCH v2 0/2] test: cleanups of aggregate-results.sh Junio C Hamano
  2 siblings, 0 replies; 5+ messages in thread
From: Felipe Contreras @ 2023-03-09 17:30 UTC (permalink / raw)
  To: git; +Cc: Ævar Arnfjörð Bjarmason, Eric Wong,
	Felipe Contreras

When the list of files as input was implemented in 6508eedf67
(t/aggregate-results: accomodate systems with small max argument list
length, 2010-06-01), a much simpler solution wasn't considered.

Let's just pass the directory as an argument.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/subtree/t/Makefile | 4 +---
 t/Makefile                 | 4 +---
 t/aggregate-results.sh     | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/contrib/subtree/t/Makefile b/contrib/subtree/t/Makefile
index 4655e0987b..aa204d43b6 100644
--- a/contrib/subtree/t/Makefile
+++ b/contrib/subtree/t/Makefile
@@ -74,9 +74,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \
-		echo "$$f"; \
-	done | '$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh
+	'$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 valgrind:
 	$(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
diff --git a/t/Makefile b/t/Makefile
index 2c2b252240..6ce79849e1 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -140,9 +140,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \
-		echo "$$f"; \
-	done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
+	'$(SHELL_PATH_SQ)' ./aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 valgrind:
 	$(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
diff --git a/t/aggregate-results.sh b/t/aggregate-results.sh
index 7f2b83bdc8..6e3bcc4aec 100755
--- a/t/aggregate-results.sh
+++ b/t/aggregate-results.sh
@@ -8,7 +8,7 @@ broken=0
 total=0
 missing_prereq=
 
-while read file
+for file in "$1"/t*-*.counts
 do
 	while read type value
 	do
-- 
2.39.2


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

* [PATCH v2 2/2] test: don't print aggregate-results command
  2023-03-09 17:30 [PATCH v2 0/2] test: cleanups of aggregate-results.sh Felipe Contreras
  2023-03-09 17:30 ` [PATCH v2 1/2] test: simplify counts aggregation Felipe Contreras
@ 2023-03-09 17:30 ` Felipe Contreras
  2023-03-10 19:25 ` [PATCH v2 0/2] test: cleanups of aggregate-results.sh Junio C Hamano
  2 siblings, 0 replies; 5+ messages in thread
From: Felipe Contreras @ 2023-03-09 17:30 UTC (permalink / raw)
  To: git; +Cc: Ævar Arnfjörð Bjarmason, Eric Wong,
	Felipe Contreras

There's no value in it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/subtree/t/Makefile | 2 +-
 t/Makefile                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/subtree/t/Makefile b/contrib/subtree/t/Makefile
index aa204d43b6..093399c788 100644
--- a/contrib/subtree/t/Makefile
+++ b/contrib/subtree/t/Makefile
@@ -74,7 +74,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	'$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
+	@'$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 valgrind:
 	$(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
diff --git a/t/Makefile b/t/Makefile
index 6ce79849e1..88fa504957 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -140,7 +140,7 @@ aggregate-results-and-cleanup: $(T)
 	$(MAKE) clean
 
 aggregate-results:
-	'$(SHELL_PATH_SQ)' ./aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
+	@'$(SHELL_PATH_SQ)' ./aggregate-results.sh '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 valgrind:
 	$(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
-- 
2.39.2


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

* Re: [PATCH v2 0/2] test: cleanups of aggregate-results.sh
  2023-03-09 17:30 [PATCH v2 0/2] test: cleanups of aggregate-results.sh Felipe Contreras
  2023-03-09 17:30 ` [PATCH v2 1/2] test: simplify counts aggregation Felipe Contreras
  2023-03-09 17:30 ` [PATCH v2 2/2] test: don't print aggregate-results command Felipe Contreras
@ 2023-03-10 19:25 ` Junio C Hamano
  2023-03-10 21:51   ` Eric Wong
  2 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2023-03-10 19:25 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason, Eric Wong; +Cc: Felipe Contreras, git

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Basically $title.
>
> Since v1 I'm now passing the directory, instead of the file pattern as
> Ævar suggested.
>
> Also, while at it, let's silence the print of the command.
>
> Felipe Contreras (2):
>   test: simplify counts aggregation
>   test: don't print aggregate-results command
>
>  contrib/subtree/t/Makefile | 4 +---
>  t/Makefile                 | 4 +---
>  t/aggregate-results.sh     | 2 +-
>  3 files changed, 3 insertions(+), 7 deletions(-)

These two look sensible.  Any comments on them by reviewers on the
initial round?

Will queue.  Thanks, all.

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

* Re: [PATCH v2 0/2] test: cleanups of aggregate-results.sh
  2023-03-10 19:25 ` [PATCH v2 0/2] test: cleanups of aggregate-results.sh Junio C Hamano
@ 2023-03-10 21:51   ` Eric Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2023-03-10 21:51 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Ævar Arnfjörð Bjarmason, Felipe Contreras, git

Junio C Hamano <gitster@pobox.com> wrote:
> These two look sensible.  Any comments on them by reviewers on the
> initial round?

Looks fine to me.

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

end of thread, other threads:[~2023-03-10 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 17:30 [PATCH v2 0/2] test: cleanups of aggregate-results.sh Felipe Contreras
2023-03-09 17:30 ` [PATCH v2 1/2] test: simplify counts aggregation Felipe Contreras
2023-03-09 17:30 ` [PATCH v2 2/2] test: don't print aggregate-results command Felipe Contreras
2023-03-10 19:25 ` [PATCH v2 0/2] test: cleanups of aggregate-results.sh Junio C Hamano
2023-03-10 21:51   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).