New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle test task failing following update to Xcode 8 #296
Comments
I have also problems with one project that the tests do not execute. I have the following error in the Session-Tests log: (You find the Sesson-Test log the the Derived Data directory when you view the ouput in the Console.app) I don't know it this is releated to your issue... |
Hey @renep, this is what I see in the log file in my Derived Data directory:
I suspect the test operation was cancelled for me because of the linking error as pasted in my question earlier but I'm not certain. I'll try running my tests from the command line using the |
Just tried running my tests with this command...
... and the tests ran successfully. Not sure what's going wrong with the Gradle plugin? |
I'm wondering... |
Hey @renep, sorry, I should have said: I tried running the tests via the Gradle plugin against the iOS 10.0 Simulator also and got the same linking error. The reason I ran the |
Have you tried the 0.14.2-develop version? |
@hennykat can you run the |
Looks like that the simulator can be launched or crashes. |
And using Xcode 8 compiling and running the unit tests works? What does the log file say that in |
Hi @renep, I just tried using the current development version of the plugin but unfortunately I'm seeing the same error message as describe earlier in this thread. |
Does this issue also occur when you create a new project? If not can you create example project that has this problem. My problem is that I cannot reproduce this issue, therefor it is hard to guess what the problem is. |
@renep: Sure, I'll make a new project that demonstrates the problem. Watch this space. |
I'm having the same issue. Last week everything worked fine. Now that i have Unit-Tests in Swift instead of obj-C the test won't run. Any update? |
As I said, I cannot reproduce this issue. If someone provide an example project where I can reproduce this issue, I can work on it. |
Apologies for the delay in putting together a project that demonstrates this error. It's on my todo list. |
FYI: I had the following error when running a test target on Jenkins, but not when running it directly in Xcode. As it turns out, you need to copy your frameworks in a copy files phase for test targets... xcodebuild[75962:9097252] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted} |
@CodeStage: good to hear you got it working! What values did you put in for "Destination", "Subpath" etc in the "Copy Files" Build Phases setting that you added? I've attached a screenshot of my project structure (see below). As you can see, my test target links to the "ShardCode" and "TestContracts" static library targets by by means of the "Link Binary With Libraries" Build Phase. And my test target links to the "JustRideSDK" target by means of the "Compile Sources" Build Phase. The tests run and pass when run in Xcode. I get linker errors however when running the tests by means of the Xcode Gradle plugin. (I am yet to compose a small example of the problem. Watch this space!) |
Destination: Frameworks I had to add the dynamic frameworks (e.g. Swift frameworks) in a copy files phase. You don't need to copy static libraries for test targets AFAIK, because they are already linked to your app. So you might have another issue there... |
Good news: I've just tried this on Xcode 9.0 with the latest development version of this plugin and it appears to be working again. |
I have an iOS Framework project that is composed of the main Framework target as well as a static library target. I've been running the
gradle test
task on this project with Xcode 7 installed and the tests in the test target having been running as expected. Following my update of Xcode yesterday to the latest version (8), the tests run fine within Xcode but fail when run via thegradle test
task.I see that the
gradle test
task does manage to launch the simulator but the task fails subsequently with a linking error as follows:The classes that it's complaining of are those that reside in the static library target.
Is anyone else having problems running their tests via the Gradle plugin?
The text was updated successfully, but these errors were encountered: