discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tests


From: Richard Frith-Macdonald
Subject: Re: Tests
Date: Thu, 2 Feb 2012 08:09:04 +0000

On 1 Feb 2012, at 20:23, Ivan Vučica wrote:

> Hi,
> 
> I finally had time to attempt to run the tests. I had a gnustep-tests hanging 
> around from a previous attempt to get GNUstep to run on OS X (from MacPorts, 
> including Eric's work on this), so I gave it a spin. I have immediately seen 
> that -lgnustep-corebase is a problem and I replaced it with -framework 
> CoreFoundation. It doesn't look promising.
> 
> The-Evil-MacBook:Tests ivucica$ gnustep-tests --verbose 
> Checking for presence of test subdirectories ...
> --- Running tests in CFArray ---
> Running CFArray/create.m...
> dyld: Symbol not found: ___objc_class_name_NSGarbageCollector
>   Referenced from: 
> /Users/ivucica/projects/THIRDPARTY/gnustep/dev-libs/corebase/Tests/CFArray/./obj/create
>   Expected in: flat namespace
>  in 
> /Users/ivucica/projects/THIRDPARTY/gnustep/dev-libs/corebase/Tests/CFArray/./obj/create
> /opt/local/GNUstep/System/Tools/gnustep-tests: line 300: 34694 Trace/BPT trap 
>          $RUN_CMD
> Failed file:     create.m aborted without running all tests!
> 
> …and it's repeated ad nauseam.
> 
> Probably gnustep-make is configured to tell clang or gcc (I don't know which 
> compiler it tries to use and I didn't bother checking) to use garbage 
> collector, but I have no idea. I also didn't dig deep into gnustep-tests to 
> actually figure out how it works.

No, this is because the test suite is primarily for testing ObjC programs … so 
it needs to link with the Foundation framework and runtime (even if you are 
actually only going to test C code).

It uses the NSGarbageCollector API (which can be used irrespective of whether 
the code is actually built with garbage collection or not) from Foundation to 
ensure that (if, and only if, using GC) a garbage collection pass is done 
between tests to expose GC related bugs, and empties release pools to expose 
reference counting bugs.

Now, I guess testing CoreBase is a special case … if we link with Foundation on 
Apple, we'll pull in CoreFoundation, which will conflict with CoreBase.
So, we probably need to add an option to gnustep-tests to enable testing 
non-Cocoa code, which will simply omit the calls to Cocoa stuff.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]