Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run unit tests in Xcode 8 with earlier unit test configuration

I ran into this issue after upgrading to Xcode 8. When running the tests I get this error at run time:

/Users/<me>/work/<appname>/Build/Intermediates/<appname>.build/Debug-iphonesimulator/<appname>UnitTests.build/Script-231C35D610AC1F5000D830C2.sh: line 3: /Applications/Xcode.app/Contents/Developer/Tools/RunUnitTests: No such file or directory

The sh script in the error message is trying to access the RunUnitTests tool and fails. I assume this tool has been removed in Xcode 8. It seems that for my project Xcode tries to run tests in a way that is no longer supported. If I create a brand new project no such script is created and I can run tests.

Any idea what settings I need to update in my project to get the tests running again? I tried the 'Update to recommended settings' checklist but it doesn't solve this issue.

like image 420
Mihai Damian Avatar asked Sep 13 '16 10:09

Mihai Damian


1 Answers

It seems I only needed to remove the Run Script phase that invoked that script.

like image 173
Mihai Damian Avatar answered Sep 19 '22 13:09

Mihai Damian