@@ -157,6 +157,7 @@ runs:
157
157
# * tee: still output logs while scanning for errors
158
158
# * grep -q: no output, use exit code 0 if found -> thus also &&
159
159
# * pkill: stop Godot execution (since it hangs in headless mode); simple 'head -1' did not work as expected
160
+ # since it's not available on Windows, use taskkill in that case.
160
161
# * exit: the terminated process would return 143, but this is more explicit and future-proof
161
162
#
162
163
# --disallow-focus: fail if #[itest(focus)] is encountered, to prevent running only a few tests for full CI
@@ -166,10 +167,14 @@ runs:
166
167
$GODOT4_BIN --headless -- --disallow-focus ${{ inputs.godot-args }} 2>&1 \
167
168
| tee "${{ runner.temp }}/log.txt" \
168
169
| tee >(grep -E "SCRIPT ERROR:|Can't open dynamic library" -q && {
169
- printf "\n::error::godot-itest: unrecoverable Godot error, abort...\n";
170
- pkill godot
171
- echo "OUTCOME=godot-runtime" >> $GITHUB_ENV
172
- exit 2
170
+ printf "\n::error::godot-itest: unrecoverable Godot error, abort...\n";
171
+ if [[ "$RUNNER_OS" == "Windows" ]]; then
172
+ taskkill -f -im godot*
173
+ else
174
+ pkill godot
175
+ fi
176
+ echo "OUTCOME=godot-runtime" >> $GITHUB_ENV
177
+ exit 2
173
178
})
174
179
175
180
echo "OUTCOME=success" >> $GITHUB_ENV
@@ -198,14 +203,14 @@ runs:
198
203
"godot-runtime")
199
204
echo "### :x: Godot runtime error" > $GITHUB_STEP_SUMMARY
200
205
echo "$GODOT_BUILT_FROM" >> $GITHUB_STEP_SUMMARY
201
- echo "Aborted due to an error during Godot execution." >> $GITHUB_STEP_SUMMARY
206
+ echo "Aborted due to an error during Godot execution." >> $GITHUB_STEP_SUMMARY
202
207
exit 2
203
208
;;
204
209
205
210
"godot-leak")
206
211
echo "### :x: Memory leak" > $GITHUB_STEP_SUMMARY
207
212
echo "$GODOT_BUILT_FROM" >> $GITHUB_STEP_SUMMARY
208
- echo "Integration tests cause memory leaks." >> $GITHUB_STEP_SUMMARY
213
+ echo "Integration tests cause memory leaks." >> $GITHUB_STEP_SUMMARY
209
214
exit 3
210
215
;;
211
216
0 commit comments