]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Fix test failure in GitHub CI mingw64 jobs
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 7 May 2023 19:23:56 +0000 (21:23 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 7 May 2023 20:15:28 +0000 (22:15 +0200)
test/suites/base.bash

index 7c54ec0e19eb43ebd8eabecbfe5909e9f607045a..38d269708d355b69226985cd7c9f5cb3fdaedba9 100644 (file)
@@ -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