forked from gui-cs/Terminal.Gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestloop.sh
More file actions
30 lines (22 loc) · 819 Bytes
/
testloop.sh
File metadata and controls
30 lines (22 loc) · 819 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
#!/bin/bash
# This script runs the tests in a loop until they all pass.
# It will exit if any test run fails.
dotnet build -c Debug
iterationCount=1
while true; do
echo "Starting iteration $iterationCount..."
dotnet test Tests/UnitTests --no-build --diag:TestResults/UnitTests.log -- xunit.stopOnFail=true
if [ $? -ne 0 ]; then
echo "UnitTests run failed on iteration $iterationCount. Exiting."
exit 1
fi
dotnet test Tests/UnitTestsParallelizable --no-build --diag:TestResults/UnitTestsParallelizable.log -- xunit.stopOnFail=true
if [ $? -ne 0 ]; then
echo "UnitTestsParallelizable run failed on iteration $iterationCount. Exiting."
exit 1
fi
# Clean up the log files
rm log*
# Increment the iteration counter
((iterationCount++))
done