]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Make the integration tests work under Windows (#1133)
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Wed, 12 Oct 2022 18:49:07 +0000 (21:49 +0300)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2022 18:49:07 +0000 (20:49 +0200)
Adapted the integration test scripts to be able to run on Windows.

- Added the ".sh" extension to most shell scripts. It looks like Windows needs
  this to run the scripts.
- Added special handling of carriage return characters.
- Tests that fail are deactivated for the moment.
- Added additional runners in different Msys2 environments.
- Disabled the remote_http tests "Basic auth required" and "Basic auth failed"
  due to intermittent failures.
- Disabled PCH tests for MSYS/Clang.

Co-authored-by: R. Voggenauer <rvogg@users.noreply.github.com>
22 files changed:
.github/workflows/build.yaml
test/run
test/suites/base.bash
test/suites/basedir.bash
test/suites/color_diagnostics.bash
test/suites/cpp1.bash
test/suites/debug_prefix_map.bash
test/suites/depend.bash
test/suites/direct.bash
test/suites/hardlink.bash
test/suites/modules.bash
test/suites/nocpp2.bash
test/suites/pch.bash
test/suites/profiling.bash
test/suites/profiling_gcc.bash
test/suites/remote_file.bash
test/suites/remote_http.bash
test/suites/remote_only.bash
test/suites/remote_url.bash
test/suites/serialize_diagnostics.bash
test/suites/split_dwarf.bash
test/suites/upgrade.bash

index 9371423010b31bd3990843b3f9da89dbbd7c4da2..e1775c4f73b68daa18473f447fd024fefa63b098 100644 (file)
@@ -124,6 +124,79 @@ jobs:
           name: ${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.version }}-testdir.tar.xz
           path: testdir.tar.xz
 
+  build_and_test_msys:
+    runs-on: windows-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        config:
+          - sys: mingw64
+            env: x86_64
+            compiler: gcc
+
+          - sys: mingw64
+            env: x86_64
+            compiler: clang
+
+          - sys: clang64
+            env: clang-x86_64
+            compiler: clang
+
+    name: 'Windows ${{ matrix.config.sys }} ${{ matrix.config.compiler }}'
+    defaults:
+      run:
+        shell: msys2 {0}
+    steps:
+      - name: '${{ matrix.config.sys }} Setup MSYS2'
+        uses: msys2/setup-msys2@v2
+        with:
+          msystem: ${{matrix.config.sys}}
+          update: true
+          install: >-
+            git
+            diffutils
+            tar
+            mingw-w64-${{matrix.config.env}}-toolchain
+            mingw-w64-${{matrix.config.env}}-cmake
+            mingw-w64-${{matrix.config.env}}-ninja
+            mingw-w64-${{matrix.config.env}}-hiredis
+            mingw-w64-${{matrix.config.env}}-lld
+            mingw-w64-${{matrix.config.env}}-${{matrix.config.compiler}}
+
+      - name: setup env
+        run: |
+          if [ "${{ matrix.config.compiler }}" = "gcc" ]; then
+            echo "CC=gcc" >> $GITHUB_ENV
+            echo "CXX=g++" >> $GITHUB_ENV
+          else
+            echo "CC=clang" >> $GITHUB_ENV
+            echo "CXX=clang++" >> $GITHUB_ENV
+          fi
+
+      - name: Get source
+        uses: actions/checkout@v2
+
+      - name: Build and test
+        run: ci/build
+        continue-on-error: ${{ matrix.config.allow_test_failures == true &&
+          steps.build-and-test.outputs.exit_status == 8 }}
+        env:
+          ENABLE_CACHE_CLEANUP_TESTS: 1
+          CMAKE_GENERATOR: Ninja
+          CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=CI
+          TEST_CC: gcc
+
+      - name: Collect testdir from failed tests
+        if: failure()
+        run: ci/collect-testdir
+
+      - name: Upload testdir from failed tests
+        if: failure()
+        uses: actions/upload-artifact@v2
+        with:
+          name: ${{ matrix.config.sys}}-${{ matrix.config.env }}-${{ matrix.config.compiler }}-testdir.tar.xz
+          path: testdir.tar.xz
+
   specific_tests:
     name: ${{ matrix.config.name }}
     runs-on: ${{ matrix.config.os }}
@@ -181,7 +254,6 @@ jobs:
           - name: Windows VS2019 32-bit Ninja
             os: windows-2019
             msvc_arch: x64_x86
-            allow_test_failures: true  # For now, don't fail the build on failure
             CC: cl
             CXX: cl
             ENABLE_CACHE_CLEANUP_TESTS: 1
@@ -203,7 +275,6 @@ jobs:
           - name: Windows VS2019 64-bit Ninja
             os: windows-2019
             msvc_arch: x64
-            allow_test_failures: true  # For now, don't fail the build on failure
             CC: cl
             CXX: cl
             ENABLE_CACHE_CLEANUP_TESTS: 1
index ed130e71c6092a312a344686adad0cd303a496f0..5dc123ff4028c41101f03a13d000a7f09b334b97 100755 (executable)
--- a/test/run
+++ b/test/run
@@ -162,6 +162,8 @@ objdump_cmd() {
 objdump_grep_cmd() {
     if $HOST_OS_APPLE; then
         fgrep -q "\"$1\""
+    elif $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then
+        fgrep -q "$1"
     else
         fgrep -q ": $1"
     fi
@@ -173,11 +175,17 @@ expect_stat() {
     local line
     local value=""
 
+    if $HOST_OS_WINDOWS ; then
+        filter="sed -e s/\r//g"
+    else
+        filter=cat
+    fi
+
     while read -r key value; do
         if [[ $key == $stat ]]; then
             break
         fi
-    done < <($CCACHE --print-stats)
+    done < <($CCACHE --print-stats | $filter )
 
     if [ "$expected_value" != "$value" ]; then
         test_failed_internal "Expected $stat to be $expected_value, actual $value"
@@ -204,7 +212,23 @@ expect_equal_content() {
         test_failed_internal "expect_equal_content: $2 missing"
     fi
     if ! cmp -s "$1" "$2"; then
-        test_failed_internal "$1 and $2 differ: $(echo; diff -u "$1" "$2")"
+        test_failed_internal "$1 and $2 differ"
+    fi
+}
+
+expect_equal_text_content() {
+    if [ ! -e "$1" ]; then
+        test_failed_internal "expect_equal_text_content: $1 missing"
+    fi
+    if [ ! -e "$2" ]; then
+        test_failed_internal "expect_equal_text_content: $2 missing"
+    fi
+    if ! cmp -s "$1" "$2"; then
+        if $HOST_OS_WINDOWS  && diff -u --strip-trailing-cr "$1" "$2" > /dev/null ; then
+            test_failed_internal "$1 and $2 with differ line endings."
+        else
+            test_failed_internal "$1 and $2 differ: $(echo; diff -u "$1" "$2")"
+        fi
     fi
 }
 
@@ -499,6 +523,7 @@ COMPILER_TYPE_GCC=false
 
 COMPILER_USES_LLVM=false
 COMPILER_USES_MINGW=false
+COMPILER_USES_MSVC=false
 
 ABS_ROOT_DIR="$(cd $(dirname "$0"); pwd)"
 readonly HTTP_CLIENT="${ABS_ROOT_DIR}/http-client"
@@ -511,6 +536,7 @@ HOST_OS_WINDOWS=false
 HOST_OS_CYGWIN=false
 
 compiler_version="`$CC --version 2>/dev/null | head -1`"
+
 case $compiler_version in
     *gcc*|*g++*|2.95*)
         COMPILER_TYPE_GCC=true
@@ -525,6 +551,12 @@ case $compiler_version in
         ;;
 esac
 
+case $CC in
+    *MSVC*|*msvc*)
+        COMPILER_USES_MSVC=true
+        ;;
+esac
+
 case $compiler_version in
     *llvm*|*LLVM*)
         COMPILER_USES_LLVM=true
@@ -532,6 +564,9 @@ case $compiler_version in
     *MINGW*|*mingw*)
         COMPILER_USES_MINGW=true
         ;;
+    *MSVC*|*msvc*)
+        COMPILER_USES_MSVC=true
+        ;;
 esac
 
 case $(uname -s) in
@@ -557,6 +592,12 @@ if $HOST_OS_WINDOWS; then
 else
     PATH_DELIM=":"
 fi
+RUN_WIN_XFAIL=true
+if $HOST_OS_WINDOWS &&  [ -z "${RUN_FAULTY_TESTS}" ] ; then
+    RUN_WIN_XFAIL=false
+fi
+
+
 
 if [[ $OSTYPE = msys* ]]; then
     # Native symlink support for Windows.
@@ -622,7 +663,11 @@ echo
 cd $TESTDIR || exit 1
 
 mkdir compiler
+
 COMPILER="$(pwd)/compiler/$(basename "$REAL_COMPILER_BIN")"
+if $HOST_OS_WINDOWS; then
+    COMPILER="$COMPILER.sh"
+fi
 cat >"$COMPILER" <<EOF
 #!/bin/sh
 
index db3389dc5094450317d818e49739c032ae699fd6..67a5d42aef9b1605f449041df80e71b1b1cee0d4 100644 (file)
@@ -386,11 +386,13 @@ fi
     expect_exists test1.o.*.ccache-log
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL;then
+# TODO: Leading slash is missing. (debugdirC/... instead of debugdir/C/... )
     TEST "CCACHE_DEBUGDIR"
 
     CCACHE_DEBUG=1 CCACHE_DEBUGDIR=debugdir $CCACHE_COMPILE -c test1.c
     expect_contains debugdir"$(pwd -P)"/test1.o.*.ccache-log "Result: cache_miss"
-
+fi
     # -------------------------------------------------------------------------
     TEST "CCACHE_DISABLE"
 
@@ -563,29 +565,35 @@ fi
     fi
 
     # -------------------------------------------------------------------------
-    TEST "Directory is not hashed if using -gz=zlib"
 
-    $COMPILER -E test1.c -gz=zlib >preprocessed.i 2>/dev/null
-    if [ -s preprocessed.i ] && ! fgrep -q $PWD preprocessed.i; then
-        mkdir dir1 dir2
-        cp test1.c dir1
-        cp test1.c dir2
-
-        cd dir1
-        $CCACHE_COMPILE -c test1.c -gz=zlib
-        expect_stat preprocessed_cache_hit 0
-        expect_stat cache_miss 1
-        $CCACHE_COMPILE -c test1.c -gz=zlib
-        expect_stat preprocessed_cache_hit 1
-        expect_stat cache_miss 1
+    TEST "Directory is not hashed if using -gz=zlib"
 
-        cd ../dir2
-        $CCACHE_COMPILE -c test1.c -gz=zlib
-        expect_stat preprocessed_cache_hit 2
-        expect_stat cache_miss 1
+    $COMPILER  test1.c -gz=zlib -o /dev/null 2>/dev/null
+    if [ $? -eq 0 ]; then
+        # run test only if -gz=zlib is supported
+        $COMPILER -E test1.c -gz=zlib >preprocessed.i 2>/dev/null
+        if [ "$exit_code" == "0" ] && [ -s preprocessed.i ] && ! fgrep -q $PWD preprocessed.i; then
+            mkdir dir1 dir2
+            cp test1.c dir1
+            cp test1.c dir2
+
+            cd dir1
+            $CCACHE_COMPILE -c test1.c -gz=zlib
+            expect_stat preprocessed_cache_hit 0
+            expect_stat cache_miss 1
+            $CCACHE_COMPILE -c test1.c -gz=zlib
+            expect_stat preprocessed_cache_hit 1
+            expect_stat cache_miss 1
+
+            cd ../dir2
+            $CCACHE_COMPILE -c test1.c -gz=zlib
+            expect_stat preprocessed_cache_hit 2
+            expect_stat cache_miss 1
+        fi
     fi
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "CCACHE_NOHASHDIR"
 
     mkdir dir1 dir2
@@ -604,6 +612,7 @@ fi
     CCACHE_NOHASHDIR=1 $CCACHE_COMPILE -c test1.c -g
     expect_stat preprocessed_cache_hit 2
     expect_stat cache_miss 1
+fi
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_EXTRAFILES"
@@ -644,29 +653,28 @@ fi
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_PREFIX"
-
-    cat <<'EOF' >prefix-a
+    cat <<'EOF' >prefix-a.sh
 #!/bin/sh
 echo a >prefix.result
 exec "$@"
 EOF
-    cat <<'EOF' >prefix-b
+    cat <<'EOF' >prefix-b.sh
 #!/bin/sh
 echo b >>prefix.result
 exec "$@"
 EOF
-    chmod +x prefix-a prefix-b
+    chmod +x prefix-a.sh prefix-b.sh
     cat <<'EOF' >file.c
 int foo;
 EOF
-    PATH=.:$PATH CCACHE_PREFIX="prefix-a prefix-b" $CCACHE_COMPILE -c file.c
+    PATH=.:$PATH CCACHE_PREFIX="prefix-a.sh prefix-b.sh" $CCACHE_COMPILE -c file.c
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
     expect_content prefix.result "a
 b"
 
-    PATH=.:$PATH CCACHE_PREFIX="prefix-a prefix-b" $CCACHE_COMPILE -c file.c
+    PATH=.:$PATH CCACHE_PREFIX="prefix-a.sh prefix-b.sh" $CCACHE_COMPILE -c file.c
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
@@ -674,13 +682,12 @@ b"
 b"
 
     rm -f prefix.result
-    PATH=.:$PATH CCACHE_PREFIX_CPP="prefix-a prefix-b" $CCACHE_COMPILE -c file.c
+    PATH=.:$PATH CCACHE_PREFIX_CPP="prefix-a.sh prefix-b.sh" $CCACHE_COMPILE -c file.c
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 2
     expect_stat cache_miss 1
     expect_content prefix.result "a
 b"
-
     # -------------------------------------------------------------------------
     TEST "Files in cache"
 
@@ -750,6 +757,7 @@ b"
     expect_stat unsupported_source_language 1
 
     # -------------------------------------------------------------------------
+if ! $HOST_OS_WINDOWS; then
     TEST "-x c -c /dev/null"
 
     $CCACHE_COMPILE -x c -c /dev/null -o null.o 2>/dev/null
@@ -759,7 +767,7 @@ b"
     $CCACHE_COMPILE -x c -c /dev/null -o null.o 2>/dev/null
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
-
+fi
     # -------------------------------------------------------------------------
     TEST "-D not hashed"
 
@@ -791,6 +799,7 @@ b"
     expect_stat cache_miss 2
 
     # -------------------------------------------------------------------------
+if ! $HOST_OS_WINDOWS; then
     TEST "-frecord-gcc-switches"
 
     if $COMPILER -frecord-gcc-switches -c test1.c >&/dev/null; then
@@ -810,6 +819,7 @@ b"
         expect_stat preprocessed_cache_hit 2
         expect_stat cache_miss 2
     fi
+fi
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_DISABLE set when executing compiler"
@@ -827,6 +837,7 @@ EOF
     expect_content CCACHE_DISABLE.value '11' # preprocessor + compiler
 
     # -------------------------------------------------------------------------
+if ! ( $HOST_OS_WINDOWS && $COMPILER_TYPE_CLANG ) && [ -n "$COMPILER_ARGS" ] ; then
     TEST "CCACHE_COMPILER"
 
     $COMPILER -c -o reference_test1.o test1.c
@@ -861,17 +872,23 @@ EOF
     expect_stat cache_miss 1
     expect_stat files_in_cache 1
     expect_equal_object_files reference_test1.o test1.o
-
+fi
     # -------------------------------------------------------------------------
     TEST "CCACHE_COMPILERTYPE"
 
+    if $HOST_OS_WINDOWS; then
+        FAKE_GCC=./gcc.sh
+    else
+        FAKE_GCC=./gcc
+    fi
+
     $CCACHE_COMPILE -c test1.c
-    cat >gcc <<EOF
+    cat >$FAKE_GCC <<EOF
 #!/bin/sh
 EOF
-    chmod +x gcc
+    chmod +x $FAKE_GCC
 
-    CCACHE_DEBUG=1 $CCACHE ./gcc -c test1.c
+    CCACHE_DEBUG=1 $CCACHE $FAKE_GCC -c test1.c
     compiler_type=$(sed -En 's/.*Compiler type: (.*)/\1/p' test1.o.*.ccache-log)
     if [ "$compiler_type" != gcc ]; then
         test_failed "Compiler type $compiler_type != gcc"
@@ -879,7 +896,7 @@ EOF
 
     rm test1.o.*.ccache-log
 
-    CCACHE_COMPILERTYPE=clang CCACHE_DEBUG=1 $CCACHE ./gcc -c test1.c
+    CCACHE_COMPILERTYPE=clang CCACHE_DEBUG=1 $CCACHE $FAKE_GCC -c test1.c
     compiler_type=$(sed -En 's/.*Compiler type: (.*)/\1/p' test1.o.*.ccache-log)
     if [ "$compiler_type" != clang ]; then
         test_failed "Compiler type $compiler_type != clang"
@@ -887,7 +904,7 @@ EOF
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_PATH"
-
+if $RUN_WIN_XFAIL; then
     override_path=`pwd`/override_path
     mkdir $override_path
     cat >$override_path/cc <<EOF
@@ -899,6 +916,7 @@ EOF
     if [ ! -f override_path_compiler_executed ]; then
         test_failed "CCACHE_PATH had no effect"
     fi
+fi
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_COMPILERCHECK=mtime"
@@ -998,7 +1016,7 @@ EOF
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_COMPILERCHECK=command"
-
+if $RUN_WIN_XFAIL; then
     cat >compiler.sh <<EOF
 #!/bin/sh
 exec $COMPILER "\$@"
@@ -1027,6 +1045,7 @@ EOF
     CCACHE_COMPILERCHECK='echo foo; echo bar' $CCACHE ./compiler.sh -c test1.c
     expect_stat preprocessed_cache_hit 2
     expect_stat cache_miss 2
+fi
 
     # -------------------------------------------------------------------------
     TEST "CCACHE_COMPILERCHECK=unknown_command"
@@ -1105,19 +1124,18 @@ fi
 
     # -------------------------------------------------------------------------
     TEST "No object file due to bad prefix"
-
     cat <<'EOF' >test_no_obj.c
 int test_no_obj;
 EOF
-    cat <<'EOF' >no-object-prefix
+    cat <<'EOF' >no-object-prefix.sh
 #!/bin/sh
 # Emulate no object file from the compiler.
 EOF
-    chmod +x no-object-prefix
-    CCACHE_PREFIX=$(pwd)/no-object-prefix $CCACHE_COMPILE -c test_no_obj.c
+    chmod +x no-object-prefix.sh
+    CCACHE_PREFIX=$(pwd)/no-object-prefix.sh $CCACHE_COMPILE -c test_no_obj.c
     expect_stat compiler_produced_no_output 1
 
-    CCACHE_PREFIX=$(pwd)/no-object-prefix $CCACHE_COMPILE -c test1.c
+    CCACHE_PREFIX=$(pwd)/no-object-prefix.sh $CCACHE_COMPILE -c test1.c
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 0
     expect_stat files_in_cache 0
@@ -1142,6 +1160,7 @@ EOF
     expect_missing test1.o
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fsyntax-only /dev/null"
 
     echo existing >null.o
@@ -1172,33 +1191,33 @@ EOF
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
     expect_stat files_in_cache 1
-    expect_equal_content reference_stderr.txt stderr.txt
+    expect_equal_text_content reference_stderr.txt stderr.txt
 
     # Intentionally compiling with "-c" here but not above.
     $CCACHE_COMPILE -Wall -c stderr.c -fsyntax-only 2>stderr.txt
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
     expect_stat files_in_cache 1
-    expect_equal_content reference_stderr.txt stderr.txt
+    expect_equal_text_content reference_stderr.txt stderr.txt
+fi
 
     # -------------------------------------------------------------------------
     TEST "Empty object file"
-
     cat <<'EOF' >test_empty_obj.c
 int test_empty_obj;
 EOF
-    cat <<'EOF' >empty-object-prefix
+    cat <<'EOF' >empty-object-prefix.sh
 #!/bin/sh
 # Emulate empty object file from the compiler.
 touch test_empty_obj.o
 EOF
-    chmod +x empty-object-prefix
-    CCACHE_PREFIX=`pwd`/empty-object-prefix $CCACHE_COMPILE -c test_empty_obj.c
+    chmod +x empty-object-prefix.sh
+    CCACHE_PREFIX=`pwd`/empty-object-prefix.sh $CCACHE_COMPILE -c test_empty_obj.c
     expect_stat compiler_produced_empty_output 1
 
     # -------------------------------------------------------------------------
     TEST "Output to /dev/null"
-
+if ! $HOST_OS_WINDOWS; then
     $CCACHE_COMPILE -c test1.c
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
@@ -1206,7 +1225,7 @@ EOF
     $CCACHE_COMPILE -c test1.c -o /dev/null
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
-
+fi
     # -------------------------------------------------------------------------
 
     mkdir dir
@@ -1224,10 +1243,12 @@ EOF
         rm dir/test1.o
         chmod a-w dir
 
+if $RUN_WIN_XFAIL; then
         $CCACHE_COMPILE -c test1.c -o dir/test1.o 2>/dev/null
         expect_stat preprocessed_cache_hit 0
         expect_stat cache_miss 1
         expect_stat bad_output_file 1
+fi
     fi
 
     # -------------------------------------------------------------------------
@@ -1241,7 +1262,7 @@ int stderr(void)
 EOF
     $COMPILER -c -Wall -W -c stderr.c 2>reference_stderr.txt
     $CCACHE_COMPILE -Wall -W -c stderr.c 2>stderr.txt
-    expect_equal_content reference_stderr.txt stderr.txt
+    expect_equal_text_content reference_stderr.txt stderr.txt
 
     # -------------------------------------------------------------------------
     TEST "Merging stderr"
@@ -1283,13 +1304,13 @@ EOF
     $CCACHE_COMPILE -c test.c -MMD 2>test.stderr
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
-    expect_equal_content reference.stderr test.stderr
+    expect_equal_text_content reference.stderr test.stderr
     expect_equal_content reference.d test.d
 
     $CCACHE_COMPILE -c test.c -MMD 2>test.stderr
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
-    expect_equal_content reference.stderr test.stderr
+    expect_equal_text_content reference.stderr test.stderr
     expect_equal_content reference.d test.d
 
     # -------------------------------------------------------------------------
@@ -1538,7 +1559,7 @@ EOF
     rm compiler.args
 
     # -------------------------------------------------------------------------
-
+if ! $COMPILER_USES_MSVC; then
     for src in test1.c build/test1.c; do
         for obj in test1.o build/test1.o; do
             TEST "Dependency file content, $src -o $obj"
@@ -1549,11 +1570,11 @@ EOF
             expect_content $dep "$obj: $src"
         done
     done
-
+fi
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "Buggy GCC 6 cpp"
-
-    cat >buggy-cpp <<EOF
+    cat >buggy-cpp.sh <<EOF
 #!/bin/sh
 if echo "\$*" | grep -- -D >/dev/null; then
   $COMPILER "\$@"
@@ -1569,20 +1590,19 @@ EOF
     cat <<'EOF' >file.c
 int foo;
 EOF
-    chmod +x buggy-cpp
+    chmod +x buggy-cpp.sh
 
-    $CCACHE ./buggy-cpp -c file.c
+    $CCACHE ./buggy-cpp.sh -c file.c
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
 
-    $CCACHE ./buggy-cpp -DNOT_AFFECTING=1 -c file.c
+    $CCACHE ./buggy-cpp.sh -DNOT_AFFECTING=1 -c file.c
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 1
     expect_stat cache_miss 1
-
+fi
     # -------------------------------------------------------------------------
-if ! $HOST_OS_WINDOWS; then
     TEST ".incbin"
 
     touch empty.bin
@@ -1629,7 +1649,6 @@ EOF
         expect_stat cache_miss 1
         expect_stat unsupported_code_directive 3
     fi
-fi
 
     # -------------------------------------------------------------------------
 if ! $HOST_OS_WINDOWS; then
index bfadafd7511faac5cd8811b0bc03b6e198e99428..e739cf559d7047369acaa8fce3783da6be5b287a 100644 (file)
@@ -1,3 +1,9 @@
+SUITE_basedir_PROBE() {
+    if ! $RUN_WIN_XFAIL; then
+        echo "CCACHE_BASEDIR is broken on windows."
+    fi
+}
+
 SUITE_basedir_SETUP() {
     unset CCACHE_NODIRECT
 
@@ -222,7 +228,12 @@ EOF
     fi
 
     # -------------------------------------------------------------------------
-    for option in MF "MF "; do
+    if $HOST_OS_WINDOWS; then
+        additional_options=
+    else
+        additional_options=(MF)
+    fi
+    for option in "MF " $additional_options; do
         TEST "-${option}/absolute/path"
 
         cd dir1
@@ -243,10 +254,16 @@ EOF
     done
 
     # -------------------------------------------------------------------------
-    for option in MQ "MQ " MT "MT "; do
+    if $HOST_OS_WINDOWS; then
+        additional_options=
+    else
+        additional_options=(MQ MT)
+    fi
+    for option in "MQ " "MT " $additional_options; do
         TEST "-${option}/absolute/path"
 
         cd dir1
+
         CCACHE_BASEDIR="$(pwd)" $CCACHE_COMPILE -I"$(pwd)/include" -MMD -${option}"$(pwd)/foo.o" -c src/test.c
         expect_stat direct_cache_hit 0
         expect_stat preprocessed_cache_hit 0
@@ -262,17 +279,28 @@ EOF
         expect_content_pattern test.d "$(pwd)/foo.o:*"
         cd ..
     done
-
     # -------------------------------------------------------------------------
     # When BASEDIR is set to /, check that -MF, -MQ and -MT arguments with
     # absolute paths are rewritten to relative and that the dependency file
     # only contains relative paths.
     TEST "-MF/-MQ/-MT with absolute paths and BASEDIR set to /"
 
-    for option in MF "MF " MQ "MQ " MT "MT "; do
+    BASEDIR="/"
+    if $HOST_OS_WINDOWS; then
+        # Windows uses drives therefore "/" has no meaning, thus default to drive
+        BASEDIR=`cygpath -m "\\."`
+    fi
+
+    if $HOST_OS_WINDOWS; then
+        additional_options=
+    else
+        additional_options=(MF MQ MT)
+    fi
+    for option in "MF " "MQ " "MT " $additional_options; do
         clear_cache
         cd dir1
-        CCACHE_BASEDIR="/" $CCACHE_COMPILE -I`pwd`/include -MD -${option}`pwd`/test.d -c src/test.c
+
+        CCACHE_BASEDIR=$BASEDIR $CCACHE_COMPILE -I`pwd`/include -MD -${option}`pwd`/test.d -c src/test.c
         expect_stat direct_cache_hit 0
         expect_stat preprocessed_cache_hit 0
         expect_stat cache_miss 1
@@ -287,14 +315,14 @@ EOF
         cd ..
 
         cd dir2
-        CCACHE_BASEDIR="/" $CCACHE_COMPILE -I`pwd`/include -MD -${option}`pwd`/test.d -c src/test.c
+        CCACHE_BASEDIR=$BASEDIR $CCACHE_COMPILE -I`pwd`/include -MD -${option}`pwd`/test.d -c src/test.c
         expect_stat direct_cache_hit 1
         expect_stat preprocessed_cache_hit 0
         expect_stat cache_miss 1
         cd ..
     done
-
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "Absolute paths in stderr"
 
     cat <<EOF >test.c
@@ -336,7 +364,7 @@ EOF
         expect_stat cache_miss 1
         expect_equal_content reference.stderr ccache.stderr
     fi
-
+fi
     # -------------------------------------------------------------------------
     TEST "Relative PWD"
 
index d8db0484512c952585368e2d0bb72c1d65fe1a38..8295eb1c47138dcc65969945ec569b5eb90962de 100644 (file)
@@ -12,6 +12,11 @@ SUITE_color_diagnostics_PROBE() {
         return
     fi
 
+    if ! $RUN_WIN_XFAIL; then
+        echo "color_diagnostics tests are broken on Windows."
+        return
+    fi
+
     # Probe that real compiler actually supports colored diagnostics.
     if [[ ! $color_diagnostics_enable || ! $color_diagnostics_disable ]]; then
         echo "compiler $COMPILER does not support colored diagnostics"
index e472b285249e3ca4b02a9a4a53244a0a964c2edb..26d1b5bc0e1f59a039f5e0f5823b17c7a2edbd15 100644 (file)
@@ -10,6 +10,10 @@ SUITE_cpp1_PROBE() {
             echo "-frewrite-includes not supported by compiler"
             return
         fi
+        if $HOST_OS_WINDOWS && ! $COMPILER_USES_MSVC; then
+            echo "This test is broken on msys2 clang: Stores wrong file names like 'tmp.cpp_stdout.2Gq' instead of 'test1.c'."
+            return
+        fi
     else
         echo "Unknown compiler: $COMPILER"
         return
index 5911cf6172b1d2c3fe694d8065df221100910092..af0cdaa0f23cd6bc1c41fec29af53afc4e7e35c2 100644 (file)
@@ -3,6 +3,11 @@ SUITE_debug_prefix_map_PROBE() {
     if ! $COMPILER -c -fdebug-prefix-map=old=new test.c 2>/dev/null; then
         echo "-fdebug-prefix-map not supported by compiler"
     fi
+
+    if ! $RUN_WIN_XFAIL; then
+        echo "debug_prefix_map tests are broken on Windows."
+        return
+    fi
 }
 
 SUITE_debug_prefix_map_SETUP() {
index 88bf786de8c54d939f78c5996d460b58ac854f1a..03a14af68d68a6423167009d9fde1b4d935078c8 100644 (file)
@@ -185,13 +185,13 @@ EOF
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
-    expect_content stderr-orig.txt "`cat stderr-baseline.txt`"
+    expect_equal_text_content stderr-orig.txt stderr-baseline.txt
 
     CCACHE_DEPEND=1 $CCACHE_COMPILE -MD -Wall -W -c cpp-warning.c 2>stderr-mf.txt
     expect_stat direct_cache_hit 1
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
-    expect_content stderr-mf.txt "`cat stderr-baseline.txt`"
+    expect_equal_text_content stderr-mf.txt stderr-baseline.txt
 
     # -------------------------------------------------------------------------
     # This test case covers a case in depend mode with unchanged source file
index 5fea53b119cd9b31b1cc63f61a1a5ab907d45458..67334eef0346d23c8f1d943f59ce186c6abc6413 100644 (file)
@@ -191,6 +191,7 @@ EOF
     done
 
     # -------------------------------------------------------------------------
+if ! $COMPILER_USES_MSVC; then
     TEST "-MMD for different source files"
 
     mkdir a b
@@ -204,7 +205,7 @@ EOF
 
     $CCACHE_COMPILE -MMD -c a/source.c -o a/source.o
     expect_content a/source.d "a/source.o: a/source.c"
-
+fi
     # -------------------------------------------------------------------------
     dep_args_combinations=(
         "-MMD"
@@ -330,6 +331,7 @@ EOF
     done
 
     # -------------------------------------------------------------------------
+if ! $COMPILER_USES_MSVC; then
     TEST "Dependency file content"
 
     mkdir build
@@ -343,8 +345,9 @@ EOF
             expect_content $dep "$obj: $src"
         done
     done
-
+fi
     # -------------------------------------------------------------------------
+if ! $COMPILER_USES_MSVC; then
     TEST "-MMD for different include file paths"
 
     mkdir a b
@@ -359,7 +362,7 @@ EOF
 
     $CCACHE_COMPILE -MMD -Ia -c source.c
     expect_content source.d "source.o: source.c a/source.h"
-
+fi
     # -------------------------------------------------------------------------
     TEST "-Wp,-MD"
 
@@ -448,6 +451,7 @@ EOF
     expect_content source.d "source.o: source.c"
 
     # -------------------------------------------------------------------------
+if ! $COMPILER_USES_MSVC; then
     TEST "-MMD for different source files"
 
     mkdir a b
@@ -460,7 +464,7 @@ EOF
 
     $CCACHE_COMPILE -MMD -c a/source.c
     expect_content source.d "source.o: a/source.c"
-
+fi
     # -------------------------------------------------------------------------
     TEST "Multiple object entries in manifest"
 
@@ -615,6 +619,7 @@ EOF
     rm -f third_name.d
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "MF /dev/null"
 
     $CCACHE_COMPILE -c -MD -MF /dev/null test.c
@@ -644,7 +649,7 @@ EOF
     expect_stat cache_miss 2
     expect_stat files_in_cache 4
     expect_equal_content test.d expected.d
-
+fi
     # -------------------------------------------------------------------------
     TEST "Handling of -MT/-MQ"
 
index 31c58f0e5f52968a01094ad3f93a8929f801e58e..a49c93567c938778c782ce3af695516508988a45 100644 (file)
@@ -58,6 +58,7 @@ SUITE_hardlink() {
     expect_stat files_in_cache 2
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "Overwrite assembler"
 
     generate_code 1 test1.c
@@ -86,8 +87,9 @@ SUITE_hardlink() {
     expect_stat cache_miss 2
     expect_stat files_in_cache 4
     expect_equal_object_files reference_test1.o test1.o
-
+fi
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "Automake depend move"
 
     unset CCACHE_NODIRECT
@@ -101,8 +103,9 @@ SUITE_hardlink() {
     CCACHE_HARDLINK=1 CCACHE_DEPEND=1 $CCACHE_COMPILE -c -MMD -MF test1.d.tmp test1.c
     expect_stat direct_cache_hit 1
     mv test1.d.tmp test1.d || test_failed "second mv failed"
-
+fi
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST ".d file corrupted by compiler"
 
     unset CCACHE_NODIRECT
@@ -130,4 +133,5 @@ SUITE_hardlink() {
     expect_stat direct_cache_hit 1
     expect_stat cache_miss 2
     expect_content test1.d "test1.o: test1.c"
+fi
 }
index bd5ada924555e872da1d54fc1e87157f30294ef8..ae5c0f317a04e253f2ff433c3269b4bf9b94dce8 100644 (file)
@@ -1,9 +1,9 @@
 SUITE_modules_PROBE() {
-    if ! $COMPILER_TYPE_CLANG; then
+    if ! $COMPILER_TYPE_CLANG || $COMPILER_USES_MSVC; then
         echo "-fmodules/-fcxx-modules not supported by compiler"
     else
-        touch test.c
-        $COMPILER -fmodules test.c -S || echo "compiler does not support modules"
+        echo '#include <string>' >testmodules.cpp
+        $COMPILER -x c++ -fmodules testmodules.cpp -S || echo "compiler does not support modules"
     fi
 }
 
index 4187c3fef1e68d17e78c99013991d38ebf4054eb..6768776741a5d1dfddb064dab613415204090b5c 100644 (file)
@@ -1,3 +1,10 @@
+SUITE_nocpp2_PROBE() {
+    if $HOST_OS_WINDOWS; then
+        echo "CCACHE_NOCPP2 does not work correct on Windows"
+        return
+    fi
+}
+
 SUITE_nocpp2_SETUP() {
     export CCACHE_NOCPP2=1
     generate_code 1 test1.c
index 12968b4101fb5859a7925cd37d4f450d3b3c4a31..fefaac6a9735f3a76f8cd74e6588b698df5201fb 100644 (file)
@@ -55,7 +55,9 @@ SUITE_pch() {
 
     pch_suite_common
     if $COMPILER_TYPE_CLANG; then
-        pch_suite_clang
+        if ! [ $COMPILER_BIN = "gcc" ] || $RUN_WIN_XFAIL; then
+            pch_suite_clang
+        fi
     else
         pch_suite_gcc
     fi
@@ -173,6 +175,7 @@ pch_suite_common() {
     $COMPILER $SYSROOT -c pch.h
     backdate pch.h.gch
 
+if $RUN_WIN_XFAIL; then
     CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS time_macros" $CCACHE_COMPILE $SYSROOT -c -include pch.h pch2.c
     expect_stat direct_cache_hit 1
     expect_stat preprocessed_cache_hit 0
@@ -182,6 +185,7 @@ pch_suite_common() {
     expect_stat direct_cache_hit 2
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 2
+fi
 
     # -------------------------------------------------------------------------
     TEST "Use .gch, preprocessor mode, -include"
@@ -332,6 +336,7 @@ pch_suite_common() {
     $COMPILER $SYSROOT -c pch.h -o dir/pch.h.gch
     backdate dir/pch.h.gch
 
+if $RUN_WIN_XFAIL; then
     CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS time_macros" $CCACHE_COMPILE $SYSROOT -c -include dir/pch.h pch2.c
     expect_stat direct_cache_hit 1
     expect_stat preprocessed_cache_hit 0
@@ -341,6 +346,7 @@ pch_suite_common() {
     expect_stat direct_cache_hit 2
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 2
+fi
     rm -rf dir
 
     # -------------------------------------------------------------------------
@@ -462,6 +468,7 @@ pch_suite_gcc() {
     $COMPILER $SYSROOT -c pch.h
     backdate pch.h.gch
 
+if $RUN_WIN_XFAIL; then
     CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS time_macros" $CCACHE_COMPILE $SYSROOT -c -fpch-preprocess pch.c
     expect_stat direct_cache_hit 1
     expect_stat preprocessed_cache_hit 0
@@ -471,6 +478,7 @@ pch_suite_gcc() {
     expect_stat direct_cache_hit 2
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 2
+fi
 
     # -------------------------------------------------------------------------
     TEST "Use .gch, preprocessor mode, #include"
@@ -494,6 +502,7 @@ pch_suite_gcc() {
     $COMPILER $SYSROOT -c pch.h
     backdate pch.h.gch
 
+if $RUN_WIN_XFAIL; then
     CCACHE_NODIRECT=1 CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS time_macros" $CCACHE_COMPILE $SYSROOT -c -fpch-preprocess pch.c
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 1
@@ -503,6 +512,7 @@ pch_suite_gcc() {
     expect_stat direct_cache_hit 0
     expect_stat preprocessed_cache_hit 2
     expect_stat cache_miss 2
+fi
 
     # -------------------------------------------------------------------------
     TEST "Create and use .gch directory"
@@ -536,6 +546,7 @@ pch_suite_gcc() {
     echo "updated" >>pch.h.gch/foo # GCC seems to cope with this...
     backdate pch.h.gch/foo
 
+if $RUN_WIN_XFAIL; then
     CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS time_macros" $CCACHE_COMPILE $SYSROOT -c -include pch.h pch2.c
     expect_stat direct_cache_hit 2
     expect_stat preprocessed_cache_hit 0
@@ -545,6 +556,7 @@ pch_suite_gcc() {
     expect_stat direct_cache_hit 3
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 3
+fi
 
     # -------------------------------------------------------------------------
     TEST "Use .gch, #include, PCH_EXTSUM=1"
index e85ea43c2355b9593bffb1233e351ea28f523ff7..16dc7e0b083fd2308123cd1edd56134cbe4c89e0 100644 (file)
@@ -7,10 +7,13 @@ normalize_gcno_file() {
 
 
 SUITE_profiling_PROBE() {
-    touch test.c
+    echo 'int main(void) { return 0; }' >test.c
     if ! $COMPILER -fprofile-generate -c test.c 2>/dev/null; then
         echo "compiler does not support profiling"
     fi
+    if ! $COMPILER -fprofile-generate test.o -o test 2>/dev/null; then
+        echo "compiler cannot link with profiling"
+    fi
     if ! $COMPILER -fprofile-generate=data -c test.c 2>/dev/null; then
         echo "compiler does not support -fprofile-generate=path"
     fi
@@ -75,8 +78,8 @@ SUITE_profiling() {
     $CCACHE_COMPILE -fprofile-use -c test.c
     expect_stat direct_cache_hit 1
     expect_stat cache_miss 3
-
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fprofile-use=dir"
 
     mkdir data
@@ -104,8 +107,9 @@ SUITE_profiling() {
     $CCACHE_COMPILE -fprofile-use=data -c test.c
     expect_stat direct_cache_hit 1
     expect_stat cache_miss 3
-
+fi
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fprofile-generate=dir in different directories"
 
     mkdir -p dir1/data dir2/data
@@ -155,7 +159,7 @@ SUITE_profiling() {
         || test_failed "compilation error"
     # Note: No expect_stat here since GCC and Clang behave differently – just
     # check that the compiler doesn't warn about not finding the profile data.
-
+fi
     # -------------------------------------------------------------------------
     if $COMPILER_TYPE_GCC; then
         # GCC 9 and newer creates a mangled .gcno filename (still in the current
index cd0123450b1fbd777865cbe1cb0eb8440edc18d9..298dc16258e6f1f6375e4e5d697a58c417fc5a3a 100644 (file)
@@ -36,6 +36,7 @@ SUITE_profiling_gcc() {
     expect_stat cache_miss 3
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fprofile-dir=dir + -fprofile-use"
 
     mkdir data
@@ -61,8 +62,9 @@ SUITE_profiling_gcc() {
     $CCACHE_COMPILE -fprofile-dir=data -fprofile-use -c test.c
     expect_stat direct_cache_hit 1
     expect_stat cache_miss 3
-
+fi
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fprofile-use + -fprofile-dir=dir"
 
     mkdir data
@@ -88,8 +90,9 @@ SUITE_profiling_gcc() {
     $CCACHE_COMPILE -fprofile-use -fprofile-dir=data -c test.c
     expect_stat direct_cache_hit 1
     expect_stat cache_miss 3
-
+fi
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fprofile-dir=path1 + -fprofile-use=path2"
 
     mkdir data
@@ -160,4 +163,5 @@ SUITE_profiling_gcc() {
         expect_stat direct_cache_hit 4
         expect_stat cache_miss 3
     fi
+fi
 }
index 3e23b57e4f1ec3e370d6f3390d5ea89bf3a9861d..c4a8c1d293106ad28f72dfeaef31a19626591e7f 100644 (file)
@@ -1,6 +1,12 @@
 # This test suite verified both the file storage backend and the remote
 # storage framework itself.
 
+SUITE_remote_file_PROBE() {
+    if ! $RUN_WIN_XFAIL; then
+        echo "remote file is broken on windows."
+    fi
+}
+
 SUITE_remote_file_SETUP() {
     unset CCACHE_NODIRECT
     export CCACHE_REMOTE_STORAGE="file:$PWD/remote"
index 4815c40253074181d20101366c2f9bd0cf54078d..608448f88ad1b1216a1d75ebdfc9868c76560d16 100644 (file)
@@ -149,6 +149,11 @@ SUITE_remote_http() {
     expect_not_contains test.o.*.ccache-log secret123
 
     # -------------------------------------------------------------------------
+    # This test fails sporadically.
+    # Mostly with MSVC 32 bit, but from time to time also with all other
+    # Windows test runs.
+    # Probably the http-server is doing something wrong here.
+if $RUN_WIN_XFAIL; then
     TEST "Basic auth required"
 
     start_http_server 12780 remote "somebody:secret123"
@@ -161,8 +166,14 @@ SUITE_remote_http() {
     expect_stat files_in_cache 2
     expect_file_count 0 '*' remote # result + manifest
     expect_contains test.o.*.ccache-log "status code: 401"
+fi
 
     # -------------------------------------------------------------------------
+    # This test fails sporadically.
+    # Mostly with MSVC 32 bit, but from time to time also with all other
+    # Windows test runs.
+    # Probably the http-server is doing something wrong here.
+if $RUN_WIN_XFAIL; then
     TEST "Basic auth failed"
 
     start_http_server 12780 remote "somebody:secret123"
@@ -175,7 +186,7 @@ SUITE_remote_http() {
     expect_file_count 0 '*' remote # result + manifest
     expect_not_contains test.o.*.ccache-log secret123
     expect_contains test.o.*.ccache-log "status code: 401"
-
+fi
      # -------------------------------------------------------------------------
     TEST "IPv6 address"
 
index 44e1e8b1091fd33038faa57134ee02e91828e507..bba2560932b5d9fde96bfadbd26f96b9f70aab2d 100644 (file)
@@ -1,3 +1,9 @@
+SUITE_remote_only_PROBE() {
+    if ! $RUN_WIN_XFAIL; then
+        echo "remote file is broken on windows."
+    fi
+}
+
 SUITE_remote_only_SETUP() {
     unset CCACHE_NODIRECT
     export CCACHE_REMOTE_STORAGE="file:$PWD/remote"
index 9eba7ea5cc843e3e8b44c8727d63179ec279bc17..d2c56ed8ae37e01ff674abad2b3e1424ad087d28 100644 (file)
@@ -25,6 +25,7 @@ SUITE_remote_url() {
     expect_contains stderr.log "Cannot parse URL"
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "Reject missing scheme"
 
     export CCACHE_REMOTE_STORAGE="/qwerty"
@@ -44,4 +45,5 @@ SUITE_remote_url() {
     export CCACHE_REMOTE_STORAGE="file:foo:bar"
     $CCACHE_COMPILE -c test.c 2>stderr.log
     expect_contains stderr.log "The first segment of the relative path can't contain ':'"
+fi
 }
index cb6101085402da36779be1b4fb350b7594dc3e01..5a4df35410c941f5b5ed33a3ae036456aeb4f894 100644 (file)
@@ -44,9 +44,10 @@ SUITE_serialize_diagnostics() {
     expect_stat cache_miss 0
     expect_stat files_in_cache 0
     expect_equal_content expected.dia test.dia
-    expect_equal_content expected.stderr test.stderr
+    expect_equal_text_content expected.stderr test.stderr
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "--serialize-diagnostics + CCACHE_BASEDIR"
 
     mkdir -p dir1/src dir1/include
@@ -82,4 +83,5 @@ EOF
     expect_stat preprocessed_cache_hit 0
     expect_stat cache_miss 1
     expect_stat files_in_cache 2
+fi
 }
index 0b23ef870cabead7f3ff20244f2cd61b02a4cb99..ef75b9afc0bbe0c5f84d99ded92729682acadf03 100644 (file)
@@ -100,6 +100,7 @@ SUITE_split_dwarf() {
     # differs), so we can't verify filename hashing.
 
     # -------------------------------------------------------------------------
+if $RUN_WIN_XFAIL; then
     TEST "-fdebug-prefix-map and -gsplit-dwarf"
 
     cd dir1
@@ -117,7 +118,7 @@ SUITE_split_dwarf() {
     expect_stat cache_miss 1
     expect_stat files_in_cache 2
     expect_objdump_not_contains test.o "$(pwd)" 2>/dev/null
-
+fi
     # -------------------------------------------------------------------------
     TEST "-gsplit-dwarf -g1"
 
index 254f02e26f6f1600eae956d5e1032626c9cc8767..fd26494b5874123fc045348bb6ce1253fcdb490f 100644 (file)
@@ -1,3 +1,10 @@
+SUITE_upgrade_PROBE() {
+    if ! $RUN_WIN_XFAIL; then
+        echo "upgrade tests are broken on Windows. (mix between windows and posix path)"
+        return
+    fi
+}
+
 SUITE_upgrade() {
     # -------------------------------------------------------------------------
     TEST "Default cache config/directory without XDG variables"