diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 66125fbb4a..9001f1771e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -298,6 +298,11 @@ jobs: - name: run itest run: make itest-parallel windows=1 + + - name: kill any remaining lnd processes + if: ${{ failure() }} + shell: powershell + run: taskkill /IM lnd-itest.exe /T /F - name: Zip log files on failure if: ${{ failure() }} diff --git a/scripts/itest_parallel.sh b/scripts/itest_parallel.sh index e540a02ec4..d981bb7647 100755 --- a/scripts/itest_parallel.sh +++ b/scripts/itest_parallel.sh @@ -26,13 +26,12 @@ for pid in "${pids[@]}"; do # Overwrite the exit code if current itest doesn't return 0. if [ $current_exit_code -ne 0 ]; then - # Only write the exit code of the first failing itest. - if [ $exit_code -eq 0 ]; then + # Only write the exit code of the first failing itest. + if [ $exit_code -eq 0 ]; then exit_code=$current_exit_code - fi + fi fi done - # Exit with the exit code of the first failing itest or 0. exit $exit_code