Skip to content

Commit 31a80f3

Browse files
committed
Revert "Improve spec test execution by adding retry logic for transient errors (bytecodealliance#4393)"
This reverts commit 64cafaf.
1 parent 2372a47 commit 31a80f3

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

.github/workflows/compilation_on_sgx.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -288,24 +288,30 @@ jobs:
288288
sudo swapon /swapfile
289289
sudo swapon --show
290290
291-
- name: run spec tests with retry
292-
id: run_spec_tests
293-
uses: nick-fields/retry@v3
294-
with:
295-
command: |
296-
cd ./tests/wamr-test-suites
297-
source /opt/intel/sgxsdk/environment
291+
- name: run spec tests
292+
run: |
293+
set +e
294+
source /opt/intel/sgxsdk/environment
295+
attempts=0
296+
max_attempts=3
297+
298+
while [ $attempts -lt $max_attempts ]; do
298299
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
299-
max_attempts: 3
300-
retry_on: error
301-
shell: bash
302-
timeout_minutes: 10
300+
exitcode="$?"
303301
304-
- name: print test results
305-
run: |
306-
echo "Test results:"
307-
echo "${{ steps.run_spec_tests.outputs.stdout }}"
308-
echo "${{ steps.run_spec_tests.outputs.stderr }}"
309-
echo "Exit code: ${{ steps.run_spec_tests.outputs.exit_code }}"
310-
echo "Exit error: ${{ steps.run_spec_tests.outputs.exit_error }}"
311-
shell: bash
302+
if [ $exitcode -eq 0 ]; then
303+
echo "Spec test passed"
304+
exit 0
305+
elif [ $exitcode -ne 143 ]; then
306+
echo "Spec test failed with error code $exitcode"
307+
exit 1
308+
fi
309+
310+
echo "$exitcode is a known GitHub-hosted runner issue"
311+
echo "::notice::Re-running the spec test due to error code 143"
312+
attempts=$((attempts + 1))
313+
done
314+
315+
echo "::notice::Report an error with code 143 in SGX CI after $max_attempts attempts"
316+
exit 143
317+
working-directory: ./tests/wamr-test-suites

0 commit comments

Comments
 (0)