2023-04-29 16:56:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
GODOT=${GODOT:-godot}
|
|
|
|
|
|
|
|
END_STRING="==== TESTS FINISHED ===="
|
|
|
|
FAILURE_STRING="******** FAILED ********"
|
|
|
|
|
2023-12-31 17:17:35 +00:00
|
|
|
# Import to get GDExtension library working
|
|
|
|
$GODOT --headless --path project --export-pack '<null>' /dev/null
|
|
|
|
|
2023-04-29 16:56:33 +00:00
|
|
|
OUTPUT=$($GODOT --path project --debug --headless --quit)
|
|
|
|
ERRCODE=$?
|
|
|
|
|
|
|
|
echo "$OUTPUT"
|
|
|
|
echo
|
|
|
|
|
|
|
|
if ! echo "$OUTPUT" | grep -e "$END_STRING" >/dev/null; then
|
|
|
|
echo "ERROR: Tests failed to complete"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if echo "$OUTPUT" | grep -e "$FAILURE_STRING" >/dev/null; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Success!
|
|
|
|
exit 0
|