From 896b6aa69f8074547c7849d29cd1c39ae1e8944e Mon Sep 17 00:00:00 2001 From: Pasukhin Dmitry Date: Thu, 6 Mar 2025 10:28:46 +0000 Subject: [PATCH] Testing - Repeating failed tests in GH Action (#412) --- .../build-and-test-multiplatform.yml | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/.github/workflows/build-and-test-multiplatform.yml b/.github/workflows/build-and-test-multiplatform.yml index c43ee9c7ce..6dffc23932 100644 --- a/.github/workflows/build-and-test-multiplatform.yml +++ b/.github/workflows/build-and-test-multiplatform.yml @@ -665,6 +665,22 @@ jobs: CSF_TestScriptsPath: ${{ github.workspace }}/tests CSF_TestDataPath: ${{ github.workspace }}/data + - name: Repeating failed tests + if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20 + run: | + cd install + call env.bat vc14 win64 release + # Repeat failed tests for 10 times + for /l %%i in (1,1,10) do ( + DRAWEXE.exe -v -c testgrid -regress results/windows-x64-retest -outdir results/windows-x64-retest -parallel 0 -overwrite + DRAWEXE.exe -v -c "testsummarize results/windows-x64-retest" + ) + shell: cmd + env: + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + - name: Upload regression test results if: steps.check_failures.outputs.failed_count > 0 uses: actions/upload-artifact@v4.4.3 @@ -893,6 +909,22 @@ jobs: CSF_TestScriptsPath: ${{ github.workspace }}/tests CSF_TestDataPath: ${{ github.workspace }}/data + - name: Repeating failed tests + if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20 + run: | + cd install + call env.bat clang win64 release + # Repeat failed tests for 10 times + for /l %%i in (1,1,10) do ( + DRAWEXE.exe -v -c testgrid -regress results/windows-clang-x64-retest -outdir results/windows-clang-x64-retest -parallel 0 -overwrite + DRAWEXE.exe -v -c "testsummarize results/windows-clang-x64-retest" + ) + shell: cmd + env: + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + - name: Upload regression test results if: steps.check_failures.outputs.failed_count > 0 uses: actions/upload-artifact@v4.4.3 @@ -1091,6 +1123,23 @@ jobs: CSF_TestScriptsPath: ${{ github.workspace }}/tests CSF_TestDataPath: ${{ github.workspace }}/data + - name: Repeating failed tests + if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20 + run: | + cd install + cd bin + source env.sh + # Repeat failed tests for 10 times + for i in {1..10}; do + ./DRAWEXE -v -c testgrid -regress results/macos-x64-retest -outdir results/macos-x64-retest -parallel 0 -overwrite + ./DRAWEXE -v -c "testsummarize results/macos-x64-retest" + done + shell: bash + env: + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + - name: Copy retest results back to original location if: steps.check_failures.outputs.failed_count > 0 run: | @@ -1282,6 +1331,23 @@ jobs: CSF_TestScriptsPath: ${{ github.workspace }}/tests CSF_TestDataPath: ${{ github.workspace }}/data + - name: Repeating failed tests + if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20 + run: | + cd install + cd bin + source env.sh + # Repeat failed tests for 10 times + for i in {1..10}; do + ./DRAWEXE -v -c testgrid -regress results/macos-gcc-x64-retest -outdir results/macos-gcc-x64-retest -parallel 0 -overwrite + ./DRAWEXE -v -c "testsummarize results/macos-gcc-x64-retest" + done + shell: bash + env: + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + - name: Upload regression test results if: steps.check_failures.outputs.failed_count > 0 uses: actions/upload-artifact@v4.4.3 @@ -1468,6 +1534,24 @@ jobs: CSF_TestScriptsPath: ${{ github.workspace }}/tests CSF_TestDataPath: ${{ github.workspace }}/data + - name: Repeating failed tests + if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20 + run: | + cd install + cd bin + source env.sh + # Repeat failed tests for 10 times + for i in {1..10}; do + ./DRAWEXE -v -c testgrid -regress results/linux-clang-x64-retest -outdir results/linux-clang-x64-retest -parallel 0 -overwrite + ./DRAWEXE -v -c "testsummarize results/linux-clang-x64-retest" + done + shell: bash + env: + DISPLAY: :99 + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + - name: Upload regression test results if: steps.check_failures.outputs.failed_count > 0 uses: actions/upload-artifact@v4.4.3 @@ -1654,6 +1738,24 @@ jobs: CSF_TestScriptsPath: ${{ github.workspace }}/tests CSF_TestDataPath: ${{ github.workspace }}/data + - name: Repeating failed tests + if: steps.check_failures.outputs.failed_count > 0 && steps.check_failures.outputs.failed_count < 20 + run: | + cd install + cd bin + source env.sh + # Repeat failed tests for 10 times + for i in {1..10}; do + ./DRAWEXE -v -c testgrid -regress results/linux-gcc-x64-retest -outdir results/linux-gcc-x64-retest -parallel 0 -overwrite + ./DRAWEXE -v -c "testsummarize results/linux-gcc-x64-retest" + done + shell: bash + env: + DISPLAY: :99 + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + - name: Upload regression test results if: steps.check_failures.outputs.failed_count > 0 uses: actions/upload-artifact@v4.4.3