Skip to content

Conversation

@limbonaut
Copy link
Collaborator

@limbonaut limbonaut commented Oct 31, 2025

This PR:

  • Introduces a custom test runner, that can be executed directly from code, and bumps gdUnit4 to required commit.
  • Updates CI to use the new test runner, since it improves readability in GH logs.
  • To initiate tests, the demo project expects the following environment variables to be set:
    SENTRY_TEST=1
    SENTRY_TEST_INCLUDE="res://test/suites/"   # ";"-separated list of files and/or directories
    • Additionally, these variables can be set via Android extent extras using the same names.
  • Adds a tool button to run tests straight from the demo project for convenience.
  • Adds a script to run tests on Android on a locally connected device.
  • Adjusts tests for Android platform specifics, and removes mobile tests, which are no longer needed.
  • Depends on chore: Use threads interface on Android for script stack traces #436

#skip-changelog

@limbonaut limbonaut force-pushed the sentry-godot-mobile-testing branch from 11b786a to 38b64ee Compare October 31, 2025 09:06
@limbonaut limbonaut force-pushed the sentry-godot-mobile-testing branch 2 times, most recently from e619430 to a89e7d0 Compare October 31, 2025 19:57
@limbonaut limbonaut force-pushed the sentry-godot-mobile-testing branch 2 times, most recently from 4c4caf9 to 852e5fd Compare November 7, 2025 13:18
@limbonaut limbonaut force-pushed the sentry-godot-mobile-testing branch from 2e0714a to 4f6245b Compare November 7, 2025 14:50
@limbonaut limbonaut force-pushed the sentry-godot-mobile-testing branch from 4f6245b to 6a6af24 Compare November 7, 2025 14:58
TEST_PATHS=("res://test/suites/")
highlight "\nLooking for isolated test suites..."
TEST_PATHS+=($(find project/test/isolated -name "test_*.gd" -type f | sort))
abort_on_error "Failed to find isolated test suites"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Misleading success hides critical command errors.

The abort_on_error call checks the exit code of the array assignment TEST_PATHS+=(...), not the find command itself. Array assignments succeed even when find returns no results, making this error check ineffective. If find fails (e.g., directory doesn't exist), the assignment still succeeds with an empty result, and the error goes undetected until the later check at line 204.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants