I’m trying to run unit tests in a target platform as part of my CI. Running with -testPlatform StandaloneWindows64
works just fine on my PC, but if I try -testPlatform StandaloneLinux64
in a docker image, it times out.
Test execution timed out. No activity received from the player in 600 seconds.
Is it possible to get this to work?
P.S. My motivation for doing this is to make sure my library works with all compilers (IL2CPP), not just in editor.
1 Like
My gut tells me it’s due to trying to run with graphics. So is there an option in the test runner to make the built executable headless? I think that would solve this problem.
I tried passing -playerGraphicsAPI Null
which made it run headless on my PC, but it still failed in docker.
[0901/065714:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
Sending message header failed
(Filename: ./Runtime/Network/PlayerCommunicator/GeneralConnection.cpp Line: 503)
Sending message header failed
(Filename: ./Runtime/Network/PlayerCommunicator/GeneralConnection.cpp Line: 503)
[0901/065714:ERROR:sandbox_linux.cc(308)] InitializeSandbox() called with multiple threads in process gpu-process
[00:00:00] Enlighten: Finished 3 Bake Ambient Probe jobs (0.00s execute, 0.00s integrate, 26.02s wallclock)
Starting cubemap convolution for '' (size 128)
...took 0.288 seconds
Test execution timed out. No activity received from the player in 600 seconds.
I read somewhere that the ERROR:browser_main_loop.cc and ERROR:sandbox_linux.cc are benign and can be ignored…
I’m not sure what else to try.
This is a real pain for me. I just made a huge PR on my project and all my tests are passing, then I tried a local platform test with IL2CPP before merging it and the runtime crashed (even though the build succeeded)! I’m still trying to figure out the cause now, but it would be nice if my CI could catch this sooner.
This is also affecting me - trying to run unit tests in GitHub actions in a docker container. Consistently getting the following error:
[0214/093308:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
Caught fatal signal - signo:11 code:1 errno:0 addr:0x120
Obtained 8 stack frames.
#0 0x007ff6d9ced980 in funlockfile
#1 0x007ff6e39e37c1 in base::RunLoop::Run()
#2 0x007ff6e38c6865 in CefBrowserMessageLoop::smile:oMessageLoopIteration()
#3 0x0055cafa026dd8 in Application::TickTimer()
#4 0x0055cafad27d72 in InitializeUnity(void*)
#5 0x0055cafad26ec9 in main
#6 0x007ff6d990bbf7 in __libc_start_main
#7 0x0055caf93665af in _start
Aborted
I can provide a reproducible example with a public repo if there’s anyone who could look into this…
Since you’re using GitHub Actions, you can use GitHub - game-ci/unity-test-runner: Run tests for any Unity project if you’re not already. Unfortunately, it does not support target platform tests as they do not work (hopefully Unity will get them to work soon with their Docker support). So you can only run your tests in edit mode or play mode.
I’ve been able to get around this issue (which only happens on 2019 Unity BTW) by calling unti via
xvfb-run -ae /dev/stdout <unity editor executable> <unity args>
2 Likes
I did manage to get standalone tests working with regular nunit tests (but not [UnityTest]). [Solution]( Unity Test Framework 2.0 ready for feedback page-2#post-8667951)
Unity Test Runner now supports this. I made a PR for it, the solution can be copied for anyone who needs it on another CI. Add standalone testmode support by timcassell · Pull Request #219 · game-ci/unity-test-runner · GitHub
1 Like