Re: unit test exit's abnormally with code 5
Re: unit test exit's abnormally with code 5
- Subject: Re: unit test exit's abnormally with code 5
- From: Shane <email@hidden>
- Date: Sat, 20 Nov 2010 10:38:13 -0600
I thought that too, but I've checked this. I have my app proj which
depends on a dylib project that I link against, and both of them and
the unit test in the app project are built with GCC_ENABLE_OBJC_GC as
'unsupported'.
So AFAIK, everything is non-GC. Is this not correct?
On Fri, Nov 19, 2010 at 11:55 PM, Chris Hanson <email@hidden> wrote:
> I suspect what’s going on is that your unit tests are built non-GC, but the framework you’re linking against is GC-only. You’ll need to enable GC for your unit tests too, if you want to test a GC-only framework; Objective-C garbage collection is on a per-process not per-binary basis.
>
> -- Chris
>
> On Nov 14, 2010, at 2:33 PM, Shane wrote:
>
>> I'm trying to put a unit test together, so I've created a new target,
>> added my files to compile and frameworks to link to, then commented
>> out all of my code to where I have an empty setUp, tearDown, and
>> testFunc, but still getting the following error.
>>
>> /Developer/Tools/RunPlatformUnitTests.include:419: note: Running tests
>> for architecture 'x86_64' (GC OFF)
>> objc[13117]: GC: forcing GC OFF because OBJC_DISABLE_GC is set
>> 2010-11-14 16:22:29.300 otest-x86_64[13117:903] The test bundle at
>> /Users/shane/Projects/HHI/hhi/build/Release/UnitTests.octest could not
>> be loaded because its Objective-C runtime information does not match
>> the runtime information required by the test rig. This is likely
>> because the test rig is being run with Objective-C garbage collection
>> disabled, but the test bundle requires Objective-C garbage collection.
>> To enable Objective-C garbage collection for the test rig, run it in
>> an environment without the OBJC_DISABLE_GC environment variable.
>> 2010-11-14 16:22:29.307 otest-x86_64[13118:203] *** NSTask: Task
>> create for path
>> '/Users/shane/HHI/Projects/HHI/hhi/build/Release/UnitTests.octest/Contents/MacOS/UnitTests'
>> failed: 22, "Invalid argument". Terminating temporary process.
>> /Developer/Tools/RunPlatformUnitTests.include:451: error: Test rig
>> '/Developer/Tools/otest' exited abnormally with code 5 (it may have
>> crashed).shane
>>
>> My unit test is an obj-c file with the *.mm extension because I'm
>> testing obj-c as well as some c++ calls to a dyld file.
>>
>> Guess I'm having a hard time interpreting this error.
>> _______________________________________________
>>
>> 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
>
>
_______________________________________________
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