diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-09-28 10:59:19 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-30 00:56:30 -0400 |
commit | 594ee2f48f5b8affc85462543c54612ad45802bf (patch) | |
tree | aeef204ff0ae0ccbc5f8d272e2851deab0b735ad /testsuite/tests | |
parent | f66eaefd5d4a3e0c0822dd3678e5e55a7d972a0d (diff) | |
download | haskell-594ee2f48f5b8affc85462543c54612ad45802bf.tar.gz |
testsuite: Make cabal01 more robust to large environments
Sebastian unfortunately wrote a very long commit message in !5667 which
caused `xargs` to fail on windows because the environment was too big.
Fortunately `xargs` and `rm` don't need anything from the environment so
just run those commands in an empty environment (which is what env -i
achieves).
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/cabal/cabal01/Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/testsuite/tests/cabal/cabal01/Makefile b/testsuite/tests/cabal/cabal01/Makefile index fb73eae7fd..004e4c754e 100644 --- a/testsuite/tests/cabal/cabal01/Makefile +++ b/testsuite/tests/cabal/cabal01/Makefile @@ -2,11 +2,17 @@ TOP=../../.. include $(TOP)/mk/boilerplate.mk 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 '^[^=]+') +unexport $(VARS_TO_UNSET) + clean: rm -rf setup a.out dist/build/testA rm -rf ,tmp dist ,tmp2 - find . -name "*.o" |xargs rm -f - find . -name "*.hi" |xargs rm -f + find . -name "*.o" -exec rm -f {} \; + find . -name "*.hi" -exec rm -f {} \; rm -fr install-tmp rm -fr install rm -f .setup-config .installed-pkg-config |