-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_and_test_windows.bat
More file actions
50 lines (42 loc) · 887 Bytes
/
build_and_test_windows.bat
File metadata and controls
50 lines (42 loc) · 887 Bytes
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
@echo off
setlocal enabledelayedexpansion
REM Go to CPP_Source_Code
cd /d "%~dp0CPP_Source_Code" || (
echo Failed to change directory to CPP_Source_Code
exit /b 1
)
REM Run cmake
if not exist build mkdir build
cd build
echo Running CMake...
cmake .. || (
echo CMake configuration failed.
exit /b 1
)
echo Building project...
cmake --build . --config Release || (
echo Build failed.
exit /b 1
)
REM Copy PYD-file to Python/src/mdpsolver
cd Release
for %%f in (solvermodule*.pyd) do (
copy /Y %%f ..\..\..\Python\src\mdpsolver\
echo Copied %%f to Python\src\mdpsolver
)
REM Run tests
cd ..
cd ..
cd ..
echo Running test1.py...
python Python/tests/test1.py || (
echo test1.py failed.
exit /b 1
)
echo Running test2.py...
python Python/tests/test2.py || (
echo test2.py failed.
exit /b 1
)
echo All tests completed successfully.
pause