-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_parallel_tests.sh
More file actions
executable file
·40 lines (33 loc) · 1 KB
/
run_parallel_tests.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1 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
#!/bin/bash
# Start iOS test
poetry run pytest tests/test_login_ios.py::TestLiveboardiOS::test_liveboard_login_flow -v -s > ios_test_result.txt 2>&1 &
IOS_PID=$!
# Start Android test
poetry run pytest tests/test_login_android_compose.py::TestAndroidLogin::test_android_login_flow -v -s > android_test_result.txt 2>&1 &
ANDROID_PID=$!
# Wait for both to finish and capture exit codes
wait $IOS_PID
IOS_EXIT_CODE=$?
wait $ANDROID_PID
ANDROID_EXIT_CODE=$?
echo "Both iOS and Android tests completed."
echo "--- iOS Test Output ---"
cat ios_test_result.txt
if [ $IOS_EXIT_CODE -eq 0 ]; then
echo "✅ iOS tests PASSED"
else
echo "❌ iOS tests FAILED (exit code $IOS_EXIT_CODE)"
fi
echo "--- Android Test Output ---"
cat android_test_result.txt
if [ $ANDROID_EXIT_CODE -eq 0 ]; then
echo "✅ Android tests PASSED"
else
echo "❌ Android tests FAILED (exit code $ANDROID_EXIT_CODE)"
fi
# Exit nonzero if either test failed
if [ $IOS_EXIT_CODE -ne 0 ] || [ $ANDROID_EXIT_CODE -ne 0 ]; then
exit 1
else
exit 0
fi