Re: SenTestingKit fails when using CG-Only
Re: SenTestingKit fails when using CG-Only
- Subject: Re: SenTestingKit fails when using CG-Only
- From: Timothy Reaves <email@hidden>
- Date: Fri, 9 Nov 2007 16:55:48 -0500
On Nov 9, 2007, at 3:37 PM, Chris Hanson wrote:
On Nov 9, 2007, at 9:07 AM, email@hidden wrote:
I recently tried to get my test rig up and running in leopard, and
my framework has been using GC only for a while now.
Setting up a custom executable to call otest on my test bundle,
causese the following error:
Is this known, and if so, is there a workaround? If I have an app,
and want to test a critical section, that uses only GC.... how can
I accomplish that if SenTestingKit is gonna barf every time I throw
GC-Only objects at it?
The SenTestingKit.framework included with Xcode 3.0 is built GC-
supported, so it's not at fault. However, the otest test rig that
runs unit test bundles for frameworks is *not* built GC-supported in
Xcode 3.0.
To run tests for your framework, you'll need to build your own test
rig, and then tell Xcode to use it in otest's place.
You should be able to build your own test rig by just creating a
simple command-line tool that links Cocoa.framework and
SenTestingKit.framework, sets the SenTestTool user default in the
registration domain to YES (which indicates to the framework that a
test tool is being used), and then calls through to
SenSelfTestMain. The SenTestTool user default and SenSelfTestMain
function are declared in <SenTestingKit/SenTestProbe.h>.
To tell Xcode to use your test rig instead of otest, just set the
OTEST build setting to the path to your test rig.
I also had to recompile the framework; otherwise, it'd link and run,
but no tests were executed.
Anyone testing please make sure to file a defect. It's ridicules to
have to jump through these hoops to be able to test. You wouldn't
tolerate compiling your own gcc to support gc.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden