Xctool tests fail when running xcodebuild - Travis CI

I am trying to integrate my project in Travis CI and my assemblies fail with errors:

Undefined symbols for i386 architecture and Undefined for x86_64 architecture

I am getting these errors mostly for every class in my project that has not been added to the test object in the Target Membership . I could probably solve this problem by adding each .m file as a member of the test target, but that doesn't make much sense, and mine

I tried to replicate this issue locally by running both of the following commands:

xcodebuild -workspace myWorkspace.xcworkspace -scheme MyProjectTests -sdk iphonesimulator build test

xctool -workspace myWorkspace.xcworkspace -scheme MyProjectTests -sdk iphonesimulator build test

      

Using xcodebuild

, it works, runs, and tests pass. Using xctool

, the tests fail with the same errors as Travis, as Travis uses xctool.

Does anyone have any idea if there is a better solution for this problem? I guess I missed something, but I followed the standard Travis "Getting Started" step-by-step instructions.

+3


source to share


1 answer


After fussing with this bundle with no luck, it looks like I can install instead xcodebuild worked, so I added this to my travis.yml file and everything was fine:



script:
 - xcodebuild -workspace myWorkspace.xcworkspace -scheme MyProjectTests -sdk iphonesimulator build test

      

+5


source







All Articles