From dffbd0443ff4975aa744da0e34a3a64f0090c856 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr>
Date: Mon, 18 Jul 2022 18:59:15 +0200
Subject: [PATCH] [makefile] fix counting (when none)

---
 share/Makefile.testing | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/share/Makefile.testing b/share/Makefile.testing
index 121f88a0074..189e20969a5 100644
--- a/share/Makefile.testing
+++ b/share/Makefile.testing
@@ -180,9 +180,10 @@ endif
 
 .PHONY: tests
 tests:: run-tests
-	echo "Number of *.{err,res}.log files:"
-	find $(addprefix _build/default/,$(PTEST_DIRS)) -name \*.err.log -or -name \*.res.log \
-        | $(GREP) -c "^"
+	@echo "Number of *.{err,res}.log files:"
+	@find $(addprefix _build/default/,$(PTEST_DIRS)) \
+	-name \*.err.log -or -name \*.res.log \
+        | wc -l
 
 ifneq ($(PTEST_USE_WP_CACHE),no)
 ifeq ($(FRAMAC_WP_CACHEDIR),)
@@ -200,9 +201,10 @@ endif # PTEST_USE_WP_CACHE
 
 .PHONY: count-tests
 count-tests:
-	echo "Number of *.{err,res}.log files:"
-	find $(addprefix _build/default/,$(PTEST_DIRS)) -name \*.res.log -or -name \*.err.log \
-        | $(GREP) -c "^"
+	@echo "Number of *.{err,res}.log files:"
+	@find $(addprefix _build/default/,$(PTEST_DIRS)) \
+	-name \*.res.log -or -name \*.err.log \
+        | wc -l
 
 ###############################################################################
 # Local Variables:
-- 
GitLab