After enable test package, there are a couple of tests will enable by default but I would like official to disable them by default using scripting define symbol like ENTITIES_TEST at next release. My use case is I would like to use the test bootstrap provided by official and also there are some test APIs are internal that I have no access that can't setup the bootstrap externally at my project root asset folder.
#[1.0.0-pre.65] Request strip out redundant test by default
1 messages · Page 1 of 1 (latest)
@valid cairn 🙇 Can u make it happen? Btw will the test not included into player runtime build?
if you enable tests for a specific package, those tests will be included in a build, because that's how we test stuff in builds. i would just paste the test bootstrap into your own code
🥲 Ya. I tried that before but some api is internal that I have no access
which api
Last time I checked is JobUtility something. Let me check again at pre.65
JobsUtility.ClearSystemIds()
you could make an initializationsystemgroup and update it 🙂 since that calls that
or you could just reflect
🤔 Ok but why not just make it public at next release? Btw I guess we won't get InitializationSystemGroup at test runner edit mode right?
because it's an engine api and getting people to agree to make an engine api public is not that easy
by the way that api only does anything in the editor anyway
so if you're focused on testing player builds, just don't call it
🤔 I see. Actually what JobsUtility.ClearSystemIds() use for at editor?
this is the first i've heard of it but i guess we keep track of a mapping from ecs systems to job handles to help debug who scheduled what
but it only exists when the jobs debugger exists in the first place, which is only in the editor
🧐 I guess I dun need that since I just want to write test to pass
indeed
🤔 Weird. I search the entire Entities package but I dun see EcsTestData2 and EcsTestData has constructor with parameter
m_Manager.SetComponentData(entity, new EcsTestData2(-index));
m_Manager.SetComponentData(entity, new EcsTestData(index));```
for me it's in Packages/com.unity.entities/Unity.Entities.Tests/TestComponents.cs
did you regenerate project files after making entities testable
Ya. I copy tat file into project but only the 2 line at above still red.
did you say using unity.entites.tests