Godot Headless
Run headless Godot checks via scripts/run_headless_check.sh.
Workflow
- Select check mode.
- Startup check: verify project boot only.
- Scene check: run a specific
res://...scene for a bounded number of frames.
- Run the script with explicit project path when possible.
# Startup check
scripts/run_headless_check.sh --project /path/to/project
# Scene smoke test
scripts/run_headless_check.sh \
--project /path/to/project \
--scene res://tscn/tween_preview.tscn \
--quit-after 180
- Handle expected project-specific errors with allow patterns.
scripts/run_headless_check.sh \
--project /path/to/project \
--scene res://tscn/tween_preview.tscn \
--allow-error "Cannot open file 'res://poem/assets/poem.en.translation'." \
--allow-error "Failed loading resource: res://poem/assets/poem.en.translation." \
--allow-error "Unable to open file: res://.godot/imported/Board_NightMarket.png-"
- Review exit behavior.
- Exit
0: headless run succeeded and no unexpected errors were found. - Non-zero exit: Godot process failed or unexpected errors were detected.
Script Behavior
- Default binary resolution order:
$GODOT_BINgodotfound inPATH~/Documents/Godot.app/Contents/MacOS/Godot
- Default mode is strict error scanning: any
ERROR:/SCRIPT ERROR:line fails unless matched by ignore patterns. - Default mode isolates
HOMEper run to avoid user-data/log collisions in frequent headless runs. - A known macOS isolated-HOME certificate lookup error is ignored by default.
- Use
--no-isolate-homeif a project needs persistent user data from the normal HOME. - Use
--no-strict-errorsif only process exit status matters. - Pass additional Godot flags with repeated
--extra-arg.
Resources
scripts/
run_headless_check.sh: parameterized Godot headless validator for startup and scene checks.