From: Joel Rosdahl Date: Sun, 7 May 2023 19:23:56 +0000 (+0200) Subject: test: Fix test failure in GitHub CI mingw64 jobs X-Git-Tag: v4.8.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef634bdb292e1e24b8d1b5490e7857144a77c0fd;p=thirdparty%2Fccache.git test: Fix test failure in GitHub CI mingw64 jobs --- diff --git a/test/suites/base.bash b/test/suites/base.bash index 7c54ec0e1..38d269708 100644 --- a/test/suites/base.bash +++ b/test/suites/base.bash @@ -552,8 +552,10 @@ fi # ------------------------------------------------------------------------- TEST "Directory is not hashed if using -gz" - $COMPILER -E test1.c -gz >preprocessed.i 2>/dev/null - if [ -s preprocessed.i ] && ! grep -Fq $PWD preprocessed.i; then + if $COMPILER -c test1.c -gz 2>/dev/null + && $COMPILER -E test1.c -gz >preprocessed.i 2>/dev/null \ + && [ -s preprocessed.i ] \ + && ! grep -Fq $PWD preprocessed.i; then mkdir dir1 dir2 cp test1.c dir1 cp test1.c dir2