[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: question about the C test framework

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2006-05-30 15:39:55 CEST

Kamesh Jayachandran wrote:
>
>>
>> subversion/tests/libsvn_subr/.libs/lt-stream-test ? I dont see that.
>>
>> shell wrapper?
>
> libtool has the shell wrapper trick, which makes sure that correct
> version of libs are getting loaded by the program that is getting wrapped.
> This shell wrapper sets the LD_LIBRARY_PATH and such to the relevant
> libraries(in this case libs from your build area) and starts the wrapped
> program.
> Each build dir should have '.libs' directory, Not sure why you could not
> see them, do 'ls -al'.

There's another behavior I've noticed which can add confusion. Immediately
after compilation, there is no "./libs/lt-myprogram". It doesn't get
created until the first invocation of "myprogram":

### First, touch fs-test.c and rebuild.

   $ touch subversion/tests/libsvn_fs/fs-test.c
   $ make
   gcc -DLINUX=2 -D_REENTRANT -DAPR_POOL_DEBUG=5 -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -g -O2 -Wall
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread
-D_LARGEFILE64_SOURCE -DNE_LFS -DSVN_DEBUG -DAP_DEBUG -Wpointer-arith
-Wwrite-strings -Wshadow -I./subversion/include -I./subversion
-I/usr/local/include/neon -I/usr/local/apache2/include
-I/usr/local/apache2/include -I/usr/local/BerkeleyDB.4.3/include -o
subversion/tests/libsvn_fs/fs-test.o -c subversion/tests/libsvn_fs/fs-test.c
   cd subversion/tests/libsvn_fs && /bin/sh
/home/cmpilato/projects/subversion/libtool --tag=CC --silent --mode=link gcc
 -g -O2 -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes
-Wmissing-declarations -pthread -D_LARGEFILE64_SOURCE -DNE_LFS -DSVN_DEBUG
-DAP_DEBUG -Wpointer-arith -Wwrite-strings -Wshadow
-L/usr/local/BerkeleyDB.4.3/lib -rpath /usr/local/lib -o fs-test fs-test.o
../../../subversion/tests/libsvn_test-1.la
../../../subversion/libsvn_fs/libsvn_fs-1.la
../../../subversion/libsvn_delta/libsvn_delta-1.la
../../../subversion/libsvn_subr/libsvn_subr-1.la
/usr/local/apache2/lib/libaprutil-0.la -lgdbm -ldb-4.3 -lexpat
/usr/local/apache2/lib/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl -lz

### Is there a .libs lt-wrapper? Nope.

   $ ls subversion/tests/libsvn_fs/.libs/lt-fs-test
   ls: subversion/tests/libsvn_fs/.libs/lt-fs-test: No such file or directory

### Run fs-test for the first time since the build.

   $ subversion/tests/libsvn_fs/fs-test list
   Test # Mode Test Description
   ------ ----- ----------------
     1 begin a txn, check its name, then close it
     2 open an existing transaction by name
     3 begin a txn, get the txn root, and add a file
[...]
    27 test complex copies (branches)
    28 test checksums
    29 calculating closest history-affecting copies

### How about that lt-wrapper now? Yup.

   $ ls subversion/tests/libsvn_fs/.libs/lt-fs-test
   subversion/tests/libsvn_fs/.libs/lt-fs-test*

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Tue May 30 15:41:02 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.