Arcane BUNDLE_LOADER question
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