• 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
Arcane BUNDLE_LOADER question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Arcane BUNDLE_LOADER question


  • Subject: Arcane BUNDLE_LOADER question
  • From: leenoori <email@hidden>
  • Date: Sun, 10 Dec 2006 14:34:35 +0100

Given three components:

1. Main application

2. Unit tests linked against main application using the BUNDLE_LOADER build setting

3. A test runner and framework

Is there any way to get the test runner to load the main application into memory alongside the test bundle *without* running the application? Basically, I would like to know if I can run the unit tests without having to launch the application; it seems that launching the application is the only way to get it into memory.

* NSBundle -load returns NO.

* Lower-level methods like NSCreateObjectFileImageFromFile() are explicitly documented to work only for "real" bundles (ie. those built using the -bundle linker flag), not for application bundles.

* It seems that dlopen() can load the executable image into memory but the symbols in the image aren't visible to the test runner or unit tests even when the RTLD_NOW flag is passed.

* Didn't bother with CFBundle as I expect that it's built on dlopen() anyway.

I know that I can do the following:

1. Set environment variables so that test bundle will be injected into address space of application upon launch

2. Set DYLD_FRAMEWORK_PATH so that application can find test framework

3. Launch application

But really, I'm just curious to know if there is a way to run those tests without having to launch the application.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Arcane BUNDLE_LOADER question
      • From: James Bucanek <email@hidden>
  • Prev by Date: Using an alternate framework search path in the Developer Tools
  • Next by Date: Spurious long double accuracy
  • Previous by thread: Using an alternate framework search path in the Developer Tools
  • Next by thread: Re: Arcane BUNDLE_LOADER question
  • Index(es):
    • Date
    • Thread