Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

GHUnit will not compile for iPhone #162

Open
gtasko opened this issue Jul 10, 2014 · 1 comment
Open

GHUnit will not compile for iPhone #162

gtasko opened this issue Jul 10, 2014 · 1 comment

Comments

@gtasko
Copy link

gtasko commented Jul 10, 2014

Hi,

I have trouble running the test target in my device and that wouldn't be a big problem but I need to run the tests from command line and when I follow these instructions, http://gh-unit.github.io/gh-unit/docs/appledoc_include/guide_command_line.html, and executing the command line
// For iOS app
GHUNIT_CLI=1 xcodebuild -target Tests -configuration Debug -sdk iphonesimulator build
The build fails also while it tries to build for Debug-iphoneos too, which I don't get since the command line clearly says to run the target for the iphonesimulator.

My setup is actually a static library which I reference to the "Tests" target but this shouldn;t be the issue since I tried with packaging my library into a fat framework and link it to the frameworks which it provided the same error.

I also have another UI client application but there I reference the .xcodeproj to the project and link it where it works properly for both simulator and device.

So I end up getting this strange and suspicious error.

ld: warning: directory not found for option '-L/Users/gtaskos/Documents/Projects/Test/SDKs/Test iOS SDK/Test-iOS/Pods/build/Debug-iphoneos'
ld: warning: ignoring file /Users/gtaskos/Documents/Projects/Test/SDKs/Test iOS SDK/Test-iOS/Frameworks/GHUnitIOS.framework/GHUnitIOS, missing required architecture arm64 in file /Users/gtaskos/Documents/Projects/Test/SDKs/Test iOS SDK/Test-iOS/Frameworks/GHUnitIOS.framework/GHUnitIOS (4 slices)
Undefined symbols for architecture arm64:
"OBJC_CLASS$_GHAsyncTestCase", referenced from:
OBJC_CLASS$_TestMintTests in TestMintTests.o
"OBJC_METACLASS$_GHAsyncTestCase", referenced from:
OBJC_METACLASS$_TestMintTests in TestMintTests.o
"_GHComposeString", referenced from:
___38-[TestMintTests testGetTotal]_block_invoke in TestMintTests.o
___38-[TestMintTests testGetTotal]_block_invoke31 in TestMintTests.o
___40-[TestMintTests testClearTotal]_block_invoke in TestMintTests.o
___40-[TestMintTests testClearTotal]_block_invoke54 in TestMintTests.o
___37-[TestMintTests testCheckLast]_block_invoke73 in TestMintTests.o
-[TestMintTests testFlush] in TestMintTests.o
-[TestMintTests testAddData] in TestMintTests.o
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there a better way to test static libraries that I miss?

Any suggestions to work around? Maybe I could avoid the command line error at the moment ?

I will also try to integrate with Jenkins.

P.S. A really nice testing framework!

Regards.

@ykokw
Copy link

ykokw commented Mar 18, 2015

I use the GHUnitIOS.framework of v0.5.8, I know that fat file does not contain the arm64 architecture .

$ lipo -info GHUnitIOS.framework/Versions/Current/GHUnitIOS
Architectures in the fat file: GHUnitIOS.framework/Versions/Current/GHUnitIOS are: armv7 armv7s i386

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants