Skip to content

Fix tests that fail when alone #106129

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

Merged
merged 1 commit into from
May 7, 2025
Merged

Conversation

kitbdev
Copy link
Contributor

@kitbdev kitbdev commented May 6, 2025

Certain tests fail when by themselves, since they depend on other tests.
Use these args to test:
--test --tc="[ProjectSettings]*", --test --tc="[Modules][GDScript] Load source code dynamically and run it"

I tested on release build and this seems to fix the issues from #88452 for these 3 tests, the other one still has an issue in non-editor builds.

For [ProjectSettings] Get existing setting and [ProjectSettings] Default value is ignored if setting exists, they expect to be ran after the [Modules][GDScript] Script compilation and runtime test, which modifies the ProjectSettings.
I changed them to use a different project setting that was untouched by that test.

For [Modules][GDScript] Load source code dynamically and run it, the GDScript fails during compilation with an error Compile Error: GDScript bug (please report): Native class "RefCounted" not found..
This is because the language wasn't initialized for this test.

@kitbdev kitbdev added this to the 4.5 milestone May 6, 2025
@kitbdev kitbdev requested review from a team as code owners May 6, 2025 18:08

TEST_CASE("[Modules][GDScript] Load source code dynamically and run it") {
GDScriptLanguage::get_singleton()->init();
Copy link
Member

Choose a reason for hiding this comment

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

Does this solve the TODO on line 39?

Copy link
Contributor Author

@kitbdev kitbdev May 7, 2025

Choose a reason for hiding this comment

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

No, the Script compilation and runtime test still fails, and it only fails in template/release builds unlike these ones which fail when alone.
Unfortunately it is more complex to fix.

@Repiteo Repiteo merged commit eb39839 into godotengine:master May 7, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented May 7, 2025

Thanks!

@kitbdev kitbdev deleted the fix-solo-tests branch May 7, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants