Skip to content

Comments

test: Mobile test runner#433

Merged
limbonaut merged 116 commits intomainfrom
sentry-godot-mobile-testing
Nov 12, 2025
Merged

test: Mobile test runner#433
limbonaut merged 116 commits intomainfrom
sentry-godot-mobile-testing

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 with lots of output.
  • 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 script to run tests on Android on a locally connected device.
  • Updates CI to run tests on Android emulator.
  • Adds a tool button to run tests straight from the demo project for convenience.
  • 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 from 5128a9d to 718535d Compare November 9, 2025 14:32
[preset.0]

name="Android Tests"
platform="Android"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Commentary: Generated in Godot editor.

@limbonaut
Copy link
Collaborator Author

github "::endgroup::"

if [ $export_err -ne 0 ]; then
warning "Godot export process returned an error. Proceeding anyway..."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to proceed if export failed?

Copy link
Collaborator Author

@limbonaut limbonaut Nov 11, 2025

Choose a reason for hiding this comment

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

Actually, yes. We additionally check on the presence of the export artifact later in script. Presently, if you look at CI logs, Godot tends to crash after exporting to Android is completed successfully, and it doesn't involve frames from our library. So the reason is unclear as we'd need some symbols to debug it, and I'll have opportunity to look closer into it after we get Godot builds going in getsentry/godot-builds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

BTW, I couldn't reproduce it locally.

@limbonaut limbonaut merged commit 276e0e9 into main Nov 12, 2025
47 checks passed
@limbonaut limbonaut deleted the sentry-godot-mobile-testing branch November 12, 2025 12:05
Myran pushed a commit to Myran/sentry-godot that referenced this pull request Dec 20, 2025
- 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 with lots of output.
- Adds a script to run tests on Android on a locally connected device.
- Updates CI to run tests on Android emulator.
- Adds a tool button to run tests straight from the demo project for convenience.
- Adjusts tests for Android platform specifics, and removes mobile tests, which are no longer needed.
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