Skip to content

Commit 3de5422

Browse files
committed
test: update windows test to exit if test fails
1 parent 9ade3a9 commit 3de5422

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sample/Tests/test_windows.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,28 @@ Login "test/test_windows.py::WindowsTest::test_1_device_code_login"
127127

128128
# Run IMX and zkEVM tests
129129
Run-Pytest "test/test.py"
130+
if (-not $?) {
131+
Write-Output "Tests failed. Stopping execution."
132+
exit 1
133+
}
130134

131135
# Relogin
132136
Stop-SampleApp
133137
Start-SampleApp
134138
Run-Pytest "test/test_windows.py::WindowsTest::test_3_device_code_relogin"
139+
if (-not $?) {
140+
Write-Output "Relogin test failed. Stopping execution."
141+
exit 1
142+
}
135143

136144
# Reconnect
137145
Stop-SampleApp
138146
Start-SampleApp
139147
Run-Pytest "test/test_windows.py::WindowsTest::test_4_device_code_reconnect"
148+
if (-not $?) {
149+
Write-Output "Reconnect test failed. Stopping execution."
150+
exit 1
151+
}
140152

141153
# Logout
142154
Logout

0 commit comments

Comments
 (0)