Skip to content

Commit

Permalink
Merge pull request #19041 from unoplatform/dev/mazi/retry-on-fail
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund authored Dec 9, 2024
2 parents 8359486 + 4959a36 commit 1e655ed
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
12 changes: 8 additions & 4 deletions build/test-scripts/android-uitest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,13 @@ fi
pushd $BUILD_SOURCESDIRECTORY/src/Uno.NUnitTransformTool
mkdir -p $(dirname ${UNO_TESTS_FAILED_LIST})

# Fail the build on empty results
dotnet run fail-empty $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
echo "Running NUnitTransformTool"

## Fail the build when no test results could be read
dotnet run fail-empty $UNO_ORIGINAL_TEST_RESULTS

if [ $? -eq 0 ]; then
dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
fi

## Export the failed tests list for reuse in a pipeline retry
dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
popd
12 changes: 8 additions & 4 deletions build/test-scripts/ios-uitest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,13 @@ cp -R ~/Library/Logs/DiagnosticReports/* $LOG_FILE_DIRECTORY || true
pushd $BUILD_SOURCESDIRECTORY/src/Uno.NUnitTransformTool
mkdir -p $(dirname ${UNO_TESTS_FAILED_LIST})

# Fail the build on empty results
dotnet run fail-empty $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
echo "Running NUnitTransformTool"

## Fail the build when no test results could be read
dotnet run fail-empty $UNO_ORIGINAL_TEST_RESULTS

if [ $? -eq 0 ]; then
dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
fi

## Export the failed tests list for reuse in a pipeline retry
dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
popd
6 changes: 3 additions & 3 deletions build/test-scripts/wasm-run-automated-uitests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ mkdir -p $(dirname ${UNO_TESTS_FAILED_LIST})

echo "Running NUnitTransformTool"

dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST

## Fail the build when no test results could be read
dotnet run fail-empty $UNO_ORIGINAL_TEST_RESULTS

echo "Ran NUnitTransformTool"
if [ $? -eq 0 ]; then
dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST
fi

popd

0 comments on commit 1e655ed

Please sign in to comment.