diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index e5c4e4b4..9171b147 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -71,6 +71,11 @@ jobs: set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe python -m pytest integration_test.py -vv || exit /b !errorlevel! + - name: run-tests.py + run: | + set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe + python run-tests.py || exit /b !errorlevel! + - name: Run CMake (c++17) run: | cmake -S . -B build.cxx17 -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=17 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! diff --git a/run-tests.py b/run-tests.py index 54cf2b4f..7c497344 100644 --- a/run-tests.py +++ b/run-tests.py @@ -23,12 +23,13 @@ def cleanup(out: str) -> str: if not GCC_EXE: sys.exit('Failed to run tests: gcc compiler not found') -SIMPLECPP_EXE = './simplecpp' +SIMPLECPP_EXE = os.environ.get('SIMPLECPP_EXE_PATH', './simplecpp') commands = [] for f in sorted(glob.glob(os.path.expanduser('testsuite/clang-preprocessor-tests/*.c*'))): + f = f.replace('\\', '/') # glob returns backslash separators on Windows for line in open(f, 'rt', encoding='utf-8'): if line.startswith('// RUN: %clang_cc1 '): cmd = '' @@ -40,6 +41,7 @@ def cleanup(out: str) -> str: if not newcmd in commands: commands.append(cmd[1:] + ' ' + f) for f in sorted(glob.glob(os.path.expanduser('testsuite/gcc-preprocessor-tests/*.c*'))): + f = f.replace('\\', '/') # glob returns backslash separators on Windows commands.append('-E ' + f) # skipping tests..