• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unit testing Cocoa Application built with custom frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unit testing Cocoa Application built with custom frameworks


  • Subject: Unit testing Cocoa Application built with custom frameworks
  • From: Apparao Mulpuri <email@hidden>
  • Date: Mon, 16 Dec 2013 18:42:17 +0530

Hi List,

I have an application developed with few custom frameworks and plugins.
Started writing Unit tests for the Frameworks first. Unfortunatly,
Otect(/Developer/Tools/otest) is giving the crash with the following error:

setenv _REAL_SDKROOT macosx10.5

/bin/sh -c /Users/<PATH TO CODE>/../../Build/<FRAMEWORK
NAME>.build/Debug/UnitTests.build/Script-B90A51CA1313E21000FE7AC9.sh


/Developer/Tools/RunPlatformUnitTests.include:412: note: Started tests for
architectures 'x86_64'

/Developer/Tools/RunPlatformUnitTests.include:419: note: Running tests for
architecture 'x86_64' (GC OFF)

objc[77507]: GC: forcing GC OFF because OBJC_DISABLE_GC is set

2013-12-12 18:03:36.280 otest-x86_64[77507:707] The test bundle at
/Users/<PATH TO CODE>/Unittest.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.

2013-12-12 18:03:36.285 otest-x86_64[77508:203] *** NSTask: Task create for
path '/Users/<PATH TO CODE>/Unittest.octest/Contents/MacOS/Unittest'
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).

Command /bin/sh failed with exit code 1


Tried different combinations by changing Compiler to GCC 4.2 and GC flags.
Initially I am using LLVM Compiler 1.6 and GC Unsuported in Build
settings. Gone through http://chanson.livejournal.com/119303.html, but no
luck.

One way, it is working is with the Static library. I am preparing the
equivalent static Library with the same classes available in Framework. But
this leads to unnecessary overhead of generating the static library only
for Unit tests purpose. I have nearly 15 frameworks in my application,
which are built in layered architecture.

I am not getting,  how it is working with the static library and not with
my framework, though both are static types only.

*Regards,*

*Apparao Mulpuri*
_______________________________________________

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


  • Prev by Date: Unit testing Cocoa Application built with custom frameworks
  • Next by Date: Scrollable NSStackView
  • Previous by thread: Unit testing Cocoa Application built with custom frameworks
  • Next by thread: Scrollable NSStackView
  • Index(es):
    • Date
    • Thread