-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[Tests] Fix unit tests in template builds #93745
[Tests] Fix unit tests in template builds #93745
Conversation
Seems fine, but what functionality do those tests use that make them editor-only? |
Packed scene instancing with edit mode: _TestInstancePlaceholderNode *internal_created = Object::cast_to<_TestInstancePlaceholderNode>(internal_scene_loaded->instantiate(PackedScene::GEN_EDIT_STATE_MAIN_INHERITED)); |
Would be nice to be able to run template based unit tests in CI but we'd have to build debug templates as well, will test if it would make sense to run tests in release templates and check them though If we are interested in making the tests run on release as well that is, they currently are not able to run fully at least |
Will fix some things in the unit tests for release as well just for completeness, unless that grows into a lot of cases |
a2b098a
to
06d28cd
Compare
@@ -163,12 +163,14 @@ TEST_CASE("[OS] Processor count and memory information") { | |||
CHECK_MESSAGE( | |||
OS::get_singleton()->get_processor_count() >= 1, | |||
"The returned processor count should be greater than zero."); | |||
#ifdef DEBUG_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't return anything valid on non-debug builds. I could swap to check that they return 0 but don't think that's necessary
Now release builds also won't fail (though there are some errors printed that I'll investigate later) |
06d28cd
to
17929a3
Compare
Thanks! |
Thank you! |
These tests fail on template builds because they are editor only, tests now run correctly (at least on Windows, can't verify on other platforms)