Getting a Test Bot to work on Xcode Server

Man, that was a lot more work than it seems like it needed to be. Took me about 2 full hours of trial and error to finally get the tests up and running on an Xcode server instance in our network. UI Tests are still not working!

Here are a few issues I had to overcome to get it to work:

  • Because I was always checking into our SVN repository via Terminal, I had to freshly check out a build with Xcode so that it’d let me add a bot in the first place.
  • Code signing issues: needed to set the code signing to “automatic” in all targets
  • I was always getting the cryptic error message “/build”: Permission denied. So I tried changing the Build Product Path for all the targets to “~/build” but then I would get “Assertion: Can’t open output file for writing: ~/build/Debug-iphonesimulator/HelpDesk.app/PlugIns/HelpDeskTests.xctest/HelpDeskTests, errno=2 for architecture x86_64” and/or “No Info.plist found for target application at path ~/build/Debug-iphonesimulator/HelpDesk.app/Info.plist” … I tried everything from creating that directory to changing the Build Product Path elsewhere for all the targets. In the end I reset the Build Product Path to its default “build” and changed the Derived Data location to “Project-relative location” in “Project Settings”.
  • “Couldn’t communicate to a helper application” : Not sure how I fixed this one, I think it was perhaps a side effect of the code signing issues?
  • Because some targets were dependent on other ones, I had to deactivate “parallelize builds” in the Scheme settings.

STILL having issues with our UI tests though, but that seems to be a bug in Xcode – see http://stackoverflow.com/questions/39703231/xcode-ci-stuck-running-the-uitests-uploading-10-screenshots-for-apptests-text … we have filed a radar.

Aaaand now we found out why:

Found this on Twitter by @steipete:

Known Issues, Xcode 8.2:

“Simulator_app shows a black screen when booting simulated devices on macOS that do not support Metal.“

https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html

The only computers that support Metal are:

MacBook (Early 2015)
MacBook Air (Mid 2012 or newer)
MacBook Pro (Mid 2012 or newer)
Mac mini (Late 2012 or newer)
iMac (Late 2012 or newer)
Mac Pro (Late 2013 or newer)

https://support.apple.com/en-us/HT20507

So if your computer is older, this seems to be causing those issues.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s