Re: Debugging SenTestingKit UnitTests on Leopard
Re: Debugging SenTestingKit UnitTests on Leopard
- Subject: Re: Debugging SenTestingKit UnitTests on Leopard
- From: Chris Hanson <email@hidden>
- Date: Mon, 12 Nov 2007 14:26:00 -0800
On Nov 12, 2007, at 11:32 AM, Martin Häcker wrote:
For the record: I...
* Created a custom Executable with an argument of -SenTest All
* Added the following Environment Variables:
** XCInjectBundle: $(BUILT_PRODUCTS_DIR)/my unitTests.octest
** DYLD_INSERT_LIBRARIES: $(DEVELOPER_LIBRARY_DIR)/PrivateFrameworks/
DevToolsBundleInjection.framework/DevToolsBundleInjection
** DYLD_FALLBACK_FRAMEWORK_PATH: $(DEVELOPER_LIBRARY_DIR)/Frameworks
If I leave out the last one gdb doesn't even start barfing about not
finding SenTestingKit.framework - so I believer that is the right
way to fix it, as I cannot just add the searchpath to the
buildsetting LD_RUNPATH_SEARCH_PATHS.
You're correct in that. I need to post some updated instructions to
my weblog to ensure people know about that.
What happens is that my app either crashes under the debugger as
soon as I have something more complicated than NSLog(@"got here");
in my test - or that I get the output from the tests running on the
console (and I can see there that my tests do get handled by OCUnit)
but the debugger does not stop on my breakpoints.
Hmm, that should work. One thing that I have run into is that due to
the way gdb launches applications in Xcode 3.0 -- which I think
changed rather late in the game -- you may be injecting your tests
into the shell that is being used to launch your application, or into
one of the commands it runs, which probably won't be too happy.
What does your debugger console contain when your tests crash?
Depending on what it contains, you can tell whether you're running
into this issue. At which point you may be able to work around it by
adding the line
set start-with-shell 0
to your ~/.gdbinit file. This will force gdb to start the task it's
going to debug directly rather than via a shell, which in turn will
ensure that the injected test bundle isn't inappropriately injected
into some intermediate binary.
-- Chris
_______________________________________________
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