On 03/12/2009 05:06, Howard B. Golden wrote:
Hi Simon M.,
On Wednesday December 2, 2009, I wrote:
I'm not sure how to write a test case that can be added to the
validation tests. By _hand_ I have been testing by running:
$ ghc-stage2 --interactive -lpcre
On my system (Gentoo), /usr/lib64/libpcre.so is a linker script.
However, I don't think this will always be true on other systems. I'd
appreciate some suggestions about how to write the test.
I thought of this approach: In the test I will create a linker script
and point it to some convenient library (e.g., libc.so). Then I'll load
it.
For example, if libc is /lib64/libc.so.6, I will create a linker script
in<test_directory>/testc.so which contains GROUP ( /lib64/libc.so.6 ).
Then I'll execute:
./ghc-stage2 --interactive<test_directory>/testc.so
Note:<test_directory> must be an absolute path; relative paths don't
work here.
This should succeed with the following messages:
GHCi, version 6.12.0.20091126: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Loading object (dynamic)<test_directory>/testc.so ... done
final link ... done
Prelude>
Please let me know if this is an acceptable test case or give your
feedback. Thanks.
Looks good. Remember to disable the test on Windows, with
if_platform(i386-unknown-mingw32,skip).
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc