xcodetest icon indicating copy to clipboard operation
xcodetest copied to clipboard

Fails to Load Test

Open groomsy opened this issue 12 years ago • 6 comments

I have followed the instructions as best I can. When I try to run the xcodetest script, this is the results when it gets to the testing scheme for my project:

/usr/local/bin/waxsim
=================
If tests do not run, make sure you have included XCODE_TEST_LDFLAGS in your linker flags:
    In xcconfigs: OTHER_LDFLAGS = $(inherited) $(XCODE_TEST_LDFLAGS)
    In Xcode: set Other Linker Flags to include $(XCODE_TEST_LDFLAGS)
=================
Launching '/tmp/xcodetest/thankdog/thankdog.app' on'Simulator - iOS 6.0'
Session ended with error. The simulated application quit.
eTest load], file /Users/tgrooms/workspace/xcodetest/XcodeTest/SGXcodeTest.m, line 42.
=================
Unit Tests Passed
=================

The script is bailing out because it can't find any loaded unit tests. I've checked the XCODE_TEST_PATH on my local drive and I do not see them anywhere. Could one of my settings be off?

groomsy avatar Oct 24 '12 17:10 groomsy

Sorry, it's a pretty immature tool at the moment. It relies on Xcode having schemes that build targets of the same name.

I just pushed some changes that make the script print out the exact xcodebuild commands before running them. It might be worth running these in isolation and seeing whether they build the .app and .octest bundles in the right place.

At the moment, the build settings fed in mean the build directory should be /tmp/xcodetest/YOUR_APP_NAME.

If you have a sample project displaying the problem, I'm happy to have a look at it.

sgleadow avatar Oct 24 '12 23:10 sgleadow

I saw an error similar to this while playing this morning after removing the -ObjC, when I added the -ObjC back into the linker flags it started again.

sgleadow avatar Oct 25 '12 02:10 sgleadow

I added the -ObjC flag to both targets, but still no joy.

My scheme names match my target names.

I'll see if I can update the script to your latest version to look at the output. Is there a way to trigger a more verbose log to get even more details?

groomsy avatar Oct 25 '12 13:10 groomsy

I've been trying this little script the last few days instead of my xcodetest hack, and so far, it seems to be working. Much closer to what Apple's RunPlatformUnitTests does, but uses ios-sim to boot the app rather than the old mechanism. It would also work with waxsim, but ios-sim is just a brew install anyway.

Tony's script: https://gist.github.com/a46a3efe90544b6a8873

sgleadow avatar Nov 09 '12 03:11 sgleadow

I have the exact same problem, was there a solution found?

johandk89 avatar Feb 18 '13 07:02 johandk89

If you have a sample project that shows the problem, I'd be happy to have a look at it, or are you having issues with the sample app provided with this repo?

sgleadow avatar Feb 20 '13 22:02 sgleadow