-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.bat
More file actions
139 lines (124 loc) · 2.94 KB
/
run_tests.bat
File metadata and controls
139 lines (124 loc) · 2.94 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@echo off
setlocal enabledelayedexpansion
cd /d "C:\Users\Guilherme Sales\Documents\Projects\Chatify"
echo.
echo ========== TEST EXECUTION STARTED ==========
echo.
set "PASS=0"
set "FAIL=0"
REM CMD 1
echo [1/10] cargo check --workspace --bins --locked
cargo check --workspace --bins --locked
if !errorlevel! equ 0 (
echo [1] PASS
set /a PASS+=1
) else (
echo [1] FAIL
set /a FAIL+=1
)
echo.
REM CMD 2
echo [2/10] cargo fmt --all --check
cargo fmt --all --check
if !errorlevel! equ 0 (
echo [2] PASS
set /a PASS+=1
) else (
echo [2] FAIL
set /a FAIL+=1
)
echo.
REM CMD 3
echo [3/10] cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
if !errorlevel! equ 0 (
echo [3] PASS
set /a PASS+=1
) else (
echo [3] FAIL
set /a FAIL+=1
)
echo.
REM CMD 4
echo [4/10] cargo test --workspace --all-targets --locked
cargo test --workspace --all-targets --locked
if !errorlevel! equ 0 (
echo [4] PASS
set /a PASS+=1
) else (
echo [4] FAIL
set /a FAIL+=1
)
echo.
REM CMD 5
echo [5/10] cargo test --locked --test message_contracts auth_contract_returns_expected_fields
cargo test --locked --test message_contracts auth_contract_returns_expected_fields
if !errorlevel! equ 0 (
echo [5] PASS
set /a PASS+=1
) else (
echo [5] FAIL
set /a FAIL+=1
)
echo.
REM CMD 6
echo [6/10] cargo test --locked --test message_contracts compatibility_contract_client_bootstrap_flow_stays_stable
cargo test --locked --test message_contracts compatibility_contract_client_bootstrap_flow_stays_stable
if !errorlevel! equ 0 (
echo [6] PASS
set /a PASS+=1
) else (
echo [6] FAIL
set /a FAIL+=1
)
echo.
REM CMD 7
echo [7/10] cargo test --locked --test message_contracts protocol_contract_advertises_backward_compatible_version
cargo test --locked --test message_contracts protocol_contract_advertises_backward_compatible_version
if !errorlevel! equ 0 (
echo [7] PASS
set /a PASS+=1
) else (
echo [7] FAIL
set /a FAIL+=1
)
echo.
REM CMD 8
echo [8/10] cargo test --locked --test message_contracts file_contract_relays_media_metadata_and_chunks
cargo test --locked --test message_contracts file_contract_relays_media_metadata_and_chunks
if !errorlevel! equ 0 (
echo [8] PASS
set /a PASS+=1
) else (
echo [8] FAIL
set /a FAIL+=1
)
echo.
REM CMD 9
echo [9/10] cargo check --features discord-bridge --bin discord_bot --locked
cargo check --features discord-bridge --bin discord_bot --locked
if !errorlevel! equ 0 (
echo [9] PASS
set /a PASS+=1
) else (
echo [9] FAIL
set /a FAIL+=1
)
echo.
REM CMD 10
echo [10/10] cargo check -p chatify-client --features bridge-client --locked
cargo check -p chatify-client --features bridge-client --locked
if !errorlevel! equ 0 (
echo [10] PASS
set /a PASS+=1
) else (
echo [10] FAIL
set /a FAIL+=1
)
echo.
echo.
echo ========== SUMMARY ==========
echo PASS: !PASS!
echo FAIL: !FAIL!
echo =============================
endlocal