-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.bat
More file actions
64 lines (55 loc) · 1.51 KB
/
test.bat
File metadata and controls
64 lines (55 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
REM ===== test.bat =====
REM Simple test runner for Meowstro
echo Running Meowstro Tests...
REM Build the project first (including tests)
echo Building project...
cmake --build build --config Debug
if %errorlevel% neq 0 (
echo Build failed! Cannot run tests.
exit /b 1
)
echo.
echo Running tests with detailed output...
REM Find and run the test executable
set "TEST_EXECUTABLE="
if exist ".\build\bin\Debug\meowstro_tests.exe" (
set "TEST_EXECUTABLE=.\build\bin\Debug\meowstro_tests.exe"
) else if exist ".\build\bin\Debug\meowstro_tests" (
set "TEST_EXECUTABLE=.\build\bin\Debug\meowstro_tests"
) else if exist ".\build\bin\meowstro_tests.exe" (
set "TEST_EXECUTABLE=.\build\bin\meowstro_tests.exe"
) else if exist ".\build\bin\meowstro_tests" (
set "TEST_EXECUTABLE=.\build\bin\meowstro_tests"
) else (
echo ❌ Test executable not found!
echo Searched for:
echo - .\build\bin\Debug\meowstro_tests.exe
echo - .\build\bin\Debug\meowstro_tests
echo - .\build\bin\meowstro_tests.exe
echo - .\build\bin\meowstro_tests
exit /b 1
)
echo Running: %TEST_EXECUTABLE%
%TEST_EXECUTABLE%
if %errorlevel% equ 0 (
echo.
echo ✅ All tests passed!
REM Also show CTest summary
echo.
echo CTest Summary:
pushd build
ctest --output-on-failure -C Debug
if %errorlevel% neq 0 (
echo ❌ CTest failed!
popd
exit /b 1
)
popd
) else (
echo.
echo ❌ Some tests failed!
exit /b 1
)
echo.
echo Testing complete!