summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2023-04-19 13:08:12 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-19 20:05:50 -0400
commitab6c1d295cd9f492838dbd481ecc2a66bbd17393 (patch)
tree3dd43a99dfb223f6128a73a3ba4ed4b80cafee55 /testsuite/tests
parent7a96f90b20e9ea55bb305b20c73473ba75834f78 (diff)
downloadhaskell-ab6c1d295cd9f492838dbd481ecc2a66bbd17393.tar.gz
Testsuite: don't use obsolescent egrep (#22351)
Recent egrep displays the following message, breaking golden tests: egrep: warning: egrep is obsolescent; using grep -E Switch to using "grep -E" instead
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/cabal/cabal01/Makefile2
-rw-r--r--testsuite/tests/haddock/perf/Makefile8
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile2
3 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/tests/cabal/cabal01/Makefile b/testsuite/tests/cabal/cabal01/Makefile
index 004e4c754e..6ec499c9e1 100644
--- a/testsuite/tests/cabal/cabal01/Makefile
+++ b/testsuite/tests/cabal/cabal01/Makefile
@@ -5,7 +5,7 @@ include $(TOP)/mk/test.mk
# Find all the env variables starting with CI_ to unset them.
# Otherwise, we might run into environment length limitations on Windows.
# (See `xargs --show-limits`.)
-VARS_TO_UNSET := $(shell env | grep ^CI_ | egrep -o '^[^=]+')
+VARS_TO_UNSET := $(shell env | grep ^CI_ | grep -E -o '^[^=]+')
unexport $(VARS_TO_UNSET)
clean:
diff --git a/testsuite/tests/haddock/perf/Makefile b/testsuite/tests/haddock/perf/Makefile
index 23dec9110a..e80015db72 100644
--- a/testsuite/tests/haddock/perf/Makefile
+++ b/testsuite/tests/haddock/perf/Makefile
@@ -4,12 +4,12 @@ include $(TOP)/mk/test.mk
# We accept a 5% increase in parser allocations due to -haddock
haddock_parser_perf :
- WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Parser | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \
- WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Parser | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \
+ WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Parser | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \
+ WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Parser | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \
awk "BEGIN { ratio = ($$WithHaddock / $$WithoutHaddock); if (ratio > 1.05) {print \"-haddock allocation ratio too high:\", ratio; exit 1} else {exit 0} }"
# Similarly for the renamer
haddock_renamer_perf :
- WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Renamer | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \
- WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Renamer | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \
+ WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Renamer | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \
+ WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Renamer | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \
awk "BEGIN { ratio = ($$WithHaddock / $$WithoutHaddock); if (ratio > 1.20) {print \"-haddock allocation ratio too high:\", ratio; exit 1} else {exit 0} }"
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index bf2e8f5425..ffc56f8ee4 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -61,7 +61,7 @@ T13367:
T8832:
$(RM) -f T8832.o T8832.hi
- '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-ticks T8832.hs | egrep '^[a-zA-Z0-9]+ ='
+ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-ticks T8832.hs | grep -E '^[a-zA-Z0-9]+ ='
T12603:
$(RM) -f T12603.o T12603.hi