From fc0c39fe34662779431c9d75b84f60b1606bc360 Mon Sep 17 00:00:00 2001 From: Dominik Wernberger Date: Sat, 13 Jul 2024 11:52:41 +0200 Subject: [PATCH 1/2] Account for different path on Windows --- run_tests.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/run_tests.py b/run_tests.py index c21458c..31b76a0 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,8 +1,9 @@ #!/usr/bin/env python3 +import platform import subprocess import threading -from datetime import datetime, timedelta +from datetime import datetime from pathlib import Path TEST_RUNNING_MSG = """ @@ -55,8 +56,12 @@ def run(self): str(self.shard_count), "--shard-index", str(self.shard_index), + "--verbosity", + "high", ] + print(f"Running {' '.join(cmd)}") + result = subprocess.run( cmd, capture_output=True, @@ -72,7 +77,11 @@ def run(self): if __name__ == "__main__": lock_file = Path(__file__).parent / "test_err_cnt.log.lock" - test_file = Path(__file__).parent / "build" / "test" / "test" + + if "Windows" == platform.system(): + test_file = Path(__file__).parent / "build" / "test" / "Debug" / "test.exe" + else: + test_file = Path(__file__).parent / "build" / "test" / "test" if lock_file.exists(): print( From a2f6a906742294d0f114f3ecb0d734f257038f75 Mon Sep 17 00:00:00 2001 From: Dominik Wernberger Date: Sat, 13 Jul 2024 18:24:12 +0200 Subject: [PATCH 2/2] Run tests on Windows --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f817d3a..451b1bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -99,3 +99,8 @@ jobs: ${ENV:CMAKE_BUILD_PARALLEL_LEVEL}=2 cmake --preset release -DENABLE_UNIT_TESTING=ON cmake --build --preset release + + - name: Run Tests + run: | + ./build/test/Debug/test.exe --help + python3 run_tests.py