1

After upgrading from Xcode 11.3.1 to Xcode 11.4.0, unit tests are no longer running in the Xcode IDE, however they do run when executing via xcodebuild in terminal (which is pretty annoying for incremental development and testing).

I've already tried completely deleting Xcode and ~/Library/Developer/, and re-installing Xcode, but that did not help. Any suggestions as to what might be wrong with the state of my machine?

Edit: clarifying 'stalling' When running from Xcode, the app opens, then nothing shows up in the console, so it looks like the rest runner is doing nothing. About half the time, the only activity in the console will be after 1-2 minutes there will be a crash * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP, but the other half there is no crash and the app just stays open.

Again this does not happen with xcodebuild

John
  • 51
  • 7
  • edited post to clarify – John Apr 06 '20 at 00:36
  • Yes, I do mean unit tests, UI tests are working just fine. – John Apr 06 '20 at 02:51
  • When you first run a unit test, you get an access request from SimulatorTrampoline. I wonder if maybe you denied that. – matt Apr 06 '20 at 16:18
  • It's true even for a brand new project. I opened a new project, added a unit test for `XCTAssertEqual(true, true)`. Sim opens the app and no activity shows in the console - just sits open. This time, after about 2 minutes, I got a SIGSTOP as I did sometimes in my main project. I have not sen any requests from SimulatorTrampoline. I might move this over to feedback assistant and provide the stack trace etc. and see if Apple has anything to say. – John Apr 06 '20 at 16:36

1 Answers1

2

After further investigation, antivirus on my workstation was quarantining the test process as a threat, which is why it was not starting (and sometimes the process was being killed). Something to check if you see this.

John
  • 51
  • 7
  • 1
    I can't decide whether to upvote the answer for saving the world or downvote the question because it turns out it's an AskDifferent kind of issue. :) – matt Apr 06 '20 at 19:14
  • Thank you for your suggestions, it's always irritating when something like this ends up being the issue. Interesting that the XC 11.4.0 upgrade triggered it. – John Apr 06 '20 at 19:18
  • Same problem and same solution in my case. It was blocked as an exploit by Cylance for dynamic library injection. A policy update resolved it. – rmp251 Jun 04 '20 at 03:37
  • 1
    Thank you for saving my day. It was blocked as an exploit by Cylance like @rmp251 mentioned. – Canh Tran Jun 13 '20 at 13:09