-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
66 lines (54 loc) · 1.62 KB
/
Copy pathbuild.bat
File metadata and controls
66 lines (54 loc) · 1.62 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
65
66
@echo off
setlocal enabledelayedexpansion
if "%1"=="build" goto build
if "%1"=="run-server" goto run-server
if "%1"=="run-client" goto run-client
if "%1"=="test" goto test
if "%1"=="test-basic" goto test-basic
if "%1"=="test-transfer" goto test-transfer
if "%1"=="test-error" goto test-error
if "%1"=="clean" goto clean
if "%1"=="compose-up" goto compose-up
echo Usage: build.bat [build^|run-server^|run-client^|test^|test-basic^|test-transfer^|test-error^|clean^|compose-up]
exit /b 1
:build
echo Building project...
cmake -B build -S .
cmake --build build --config Release
goto end
:run-server
echo Starting server...
build\bin\server.exe --port 9000 --out .\server_data
goto end
:run-client
echo Running client...
build\bin\client.exe --host 127.0.0.1 --port 9000 --file .\sample_data\sample.bin
goto end
:test
echo Running all tests...
python tests\robot\run_tests.py --install-requirements --output-dir .\test_results
goto end
:test-basic
echo Running basic tests...
python tests\robot\run_tests.py --tags basic --output-dir .\test_results
goto end
:test-transfer
echo Running transfer tests...
python tests\robot\run_tests.py --tags transfer --output-dir .\test_results
goto end
:test-error
echo Running error tests...
python tests\robot\run_tests.py --tags error --output-dir .\test_results
goto end
:clean
echo Cleaning build artifacts...
if exist build rmdir /s /q build
if exist server_data\* del /q server_data\*
if exist test_results\* del /q test_results\*
goto end
:compose-up
echo Starting Docker Compose...
docker compose up --remove-orphans
goto end
:end
endlocal