-
-
Notifications
You must be signed in to change notification settings - Fork 273
check.sh: add logic to detect "SCRIPT ERROR" + memory leaks, like in CI #1468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1468 |
check.sh
Outdated
| run "$godotBin" $GODOT_ARGS --path itest/godot --headless -- "[${extraArgs[@]}]" | ||
| run cargo build -p itest "${extraCargoArgs[@]}" || return 1 | ||
|
|
||
| # Below logic to abort immediately if Godot outputs certain keywords (would otherwise fail only in CI). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Below logic to abort immediately if Godot outputs certain keywords (would otherwise fail only in CI). | |
| # Logic to abort immediately if Godot outputs certain keywords (would otherwise fail only in CI). |
check.sh
Outdated
| run cargo build -p itest "${extraCargoArgs[@]}" || return 1 | ||
|
|
||
| # Below logic to abort immediately if Godot outputs certain keywords (would otherwise fail only in CI). | ||
| # Keep in sync with: .github/composite/godot-itest/action.yml (steps "Run Godot integration tests" and "Check for memory leaks") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Keep in sync with: .github/composite/godot-itest/action.yml (steps "Run Godot integration tests" and "Check for memory leaks") | |
| # Keep in sync with: .github/composite/godot-itest/action.yml (steps "Run Godot integration tests" and "Check for memory leaks"). |
check.sh
Outdated
| # * tee: still output logs while scanning for errors | ||
| # * grep -q: no output, use exit code 0 if found -> thus also && | ||
| # * pkill: stop Godot execution (since it hangs in headless mode); simple 'head -1' did not work as expected | ||
| # since it's not available on Windows, use taskkill in that case. | ||
| # * exit: the terminated process would return 143, but this is more explicit and future-proof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # * tee: still output logs while scanning for errors | |
| # * grep -q: no output, use exit code 0 if found -> thus also && | |
| # * pkill: stop Godot execution (since it hangs in headless mode); simple 'head -1' did not work as expected | |
| # since it's not available on Windows, use taskkill in that case. | |
| # * exit: the terminated process would return 143, but this is more explicit and future-proof | |
| # * tee: still output logs while scanning for errors. | |
| # * grep -q: no output, use exit code 0 if found -> thus also &&. | |
| # * pkill: stop Godot execution (since it hangs in headless mode); simple 'head -1' did not work as expected | |
| # since it's not available on Windows, use taskkill in that case. | |
| # * exit: the terminated process would return 143, but this is more explicit and future-proof. |
62ab970 to
f7e6173
Compare
I noticed during #1466 that a CI error couldn't be reproduced locally. It was visible in logs, but not obvious to find, as tests kept running after the error. Basically, when GDScript causes a
SCRIPT ERROR, this is externally detected (usingtee+grep).So this PR copy-pastes the CI logic to
check.sh, with minor changes to fit the local environment. Maybe in the future we can useLoggerto detect this from within godot-rust.