Tests portability.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 20 Mar 2012 16:31:41 +0000 (16:31 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 20 Mar 2012 16:31:41 +0000 (16:31 +0000)
org.glite.jobid.api-c/Makefile
org.glite.lbjp-common.server-bones/examples/run_test.sh

index b72e1a9..8c1cbde 100644 (file)
@@ -36,7 +36,12 @@ LIBLOBJS:=${LIBOBJS:.o=.lo}
 
 LIB:=libglite_jobid.la
 
-TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit -ldl
+os=${shell uname}
+DL_LIBS:=
+ifeq (${os},Linux)
+       DL_LIBS:=-ldl
+endif
+TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit ${DL_LIBS}
 TEST_INC:=-I${cppunit_prefix}/include
 
 compile all: ${LIB}
index d21b8a2..4416609 100644 (file)
@@ -16,7 +16,7 @@ ret2=$?
 
 kill -SIGTERM $SRV_PID
 
-n=`grep 'disconnect handler' /tmp/log.$$ | wc -l`
+n=`grep 'disconnect handler' /tmp/log.$$ | wc -l | sed 's/ //g'`
 rm -f /tmp/log.$$
 
 if [ $ret1 -ne 0 -o $ret2 -ne 0 ]; then