Re: [Cedar] Trouble running Cedar from the Command line

131 views
Skip to first unread message

sco...@pivotallabs.com

unread,
Nov 15, 2012, 11:00:07 PM11/15/12
to cedar-...@googlegroups.com
Hi Matt,

Unfortunately a rake file is not included in current targets. It's in our roadmap to add these.

The documentation is referring to the Rakefile found in the cedar source. It contains a few tasks which demonstrate how different test targets can be run.

Also, unless it has been fixed recently, there is a bug in Apple's command line tools preventing command line launches of the 6.0 simulator. Until it's fixed you'll probably have to stick with 5.1 for running your simulator tests.

--Sam

On Nov 15, 2012, at 7:27 PM, Matt Wilson <matte...@gmail.com> wrote:

> Hi,
> I have an iOS project that has OCUnit and Cedar tests in it. I'm able to run the Cedar tests via XCode 4.5.2 by selecting the Specs scheme and then Product->Test. That works well. But when I try to run the tests via the command line, it doesn't work. Here's what I'm doing:
>
> /usr/bin/xcodebuild -target Specs -configuration Debug -sdk iphonesimulator6.0 clean build TEST_AFTER_BUILD=YES
> ...
> /bin/sh -c /Users/matterfact/labzero/ios_jenkins_demo/build/Lunch.build/Debug-iphonesimulator/Specs.build/Script-73EC3DFD1655908200D9C0D2.sh
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/Tools/RunPlatformUnitTests:81: warning: Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set).
>
> When I remove the simulator option:
> /usr/bin/xcodebuild -target Specs -configuration Debug clean build TEST_AFTER_BUILD=YES
> ...
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
> ** BUILD FAILED **
>
> The following build commands failed:
> Ld build/Lunch.build/Debug-iphoneos/Specs.build/Objects-normal/armv7s/Specs normal armv7s
>
> The README on https://github.com/pivotal/cedar in the "Command Line Automation" section talks about running rake, but after the installation there is not a Rakefile.
>
> Any tips?
>
> Thanks,
> Matt
>
>
>

Stewart Gleadow

unread,
Nov 16, 2012, 7:35:20 AM11/16/12
to cedar-...@googlegroups.com
I tried to write my own workaround for this https://github.com/sgleadow/xcodetest but I think the issue is not so much with the shell script and dynamic injection but with the way the simulator boots. I've got my tests running (not cedar, but other tools) using a script similar to Apple's but using a different way of booting the simulator other than the -RegisterForSystemEvents

You can still boot the simulator using tools like ios-sim (a brew install) and waxsim (on github, probably jonathanpenn's fork). I don't use Cedar, but I'm running GHUnit, Kiwi/OCUnit, KIF and Frank tests on various projects using ios-sim and waxsim to actually boot the simulator and monitoring output.
Reply all
Reply to author
Forward
0 new messages