Date: Monday, January 22, 2007 @ 12:09:35
  Author: marc
    Path: /cvsroot/carob/carob

   Added: test/dummymain.cpp (1.1)
Modified: GNUmakefile (1.21 -> 1.22) test/GNUmakefile (1.39 -> 1.40)
 Removed: dummymain.cpp (1.2)

Moved checkstatic and checklib to test/ directory, so it is easier to run them
(those are client applications)


--------------------+
 GNUmakefile        |   18 ++++--------------
 dummymain.cpp      |   20 --------------------
 test/GNUmakefile   |   31 ++++++++++++++++++++++++++-----
 test/dummymain.cpp |   27 +++++++++++++++++++++++++++
 4 files changed, 57 insertions(+), 39 deletions(-)


Index: carob/GNUmakefile
diff -u carob/GNUmakefile:1.21 carob/GNUmakefile:1.22
--- carob/GNUmakefile:1.21      Mon Jan 22 11:03:55 2007
+++ carob/GNUmakefile   Mon Jan 22 12:09:35 2007
@@ -134,10 +134,12 @@
 
    ########## CHECKS ##############"
 
-check: checkstatic checklib checkheaders
+check: checkheaders
+       $(MAKE) -C test $@
 
 clean-check:
-       ${RM} checkstatic checklib someheader.cpp someheader.o
+       ${RM} someheader.cpp someheader.o
+       $(MAKE) -C test $@
 
 # compile each include/*.hpp, isolated
 # TODO: use a GNU make loop instead of a shell script one
@@ -146,18 +148,6 @@
        printf "compiling $$h\n"; \
        $(MAKE) someheader.o || break; $(RM) someheader.o; done
 
-# Link a empty executable to our lib
-# Useful to detect unresolved symbols in our lib
-checklib:  ${LIB_CAROB_LIB}
-       - ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${CLIENT_LDLIBS} -o $@
-       ${LDD} ./$< ./$@
-# FIXME ./checklib
-
-checkstatic: ${LIB_CAROB_STATIC}
-       ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${LDFLAGS} ${LDLIBS} 
${CLIENT_LDLIBS} -o $@
-       ${LDD} ./$@
-       ./checkstatic
-
 
   ########### DIST ##################
 
Index: carob/dummymain.cpp
diff -u carob/dummymain.cpp:1.2 carob/dummymain.cpp:removed
--- carob/dummymain.cpp:1.2     Mon Jan 22 11:03:37 2007
+++ carob/dummymain.cpp Mon Jan 22 12:09:35 2007
@@ -1,20 +0,0 @@
-
-#include "Connection.hpp"
-
-#include <vector>
-
-int main()
-{
-  // ensure we pull out some symbols
-
-  // 1- Connecting:
-  // 1.1 Create the parameters of the connection
-  std::vector<CarobNS::ControllerInfo> ctrls;
-  ctrls.push_back(CarobNS::ControllerInfo(L"192.168.0.39", 25322));
-  
-  CarobNS::ConnectionParameters connectionPrms(ctrls,
-                                      L"myDB",
-                                      L"user",
-                                      L"");
-  return 0;
-}
Index: carob/test/GNUmakefile
diff -u carob/test/GNUmakefile:1.39 carob/test/GNUmakefile:1.40
--- carob/test/GNUmakefile:1.39 Mon Jan 22 11:16:39 2007
+++ carob/test/GNUmakefile      Mon Jan 22 12:09:35 2007
@@ -22,6 +22,8 @@
 # Makefile for the Carob C++ API and tests
 #
 
+LDD                     = ldd
+
 
 MKINCLUDES=../make-includes
 
@@ -52,11 +54,9 @@
 override CPPFLAGS       += -I${INCDIR}
 
 
-override CLIENT_LDLIBS     += -l${LIB_CPPUNIT}
-
 
 # For QT ui, uncomment this
-#LDFLAGS                 += -l${LIB_CPPUNIT_QTUI}
+#override LDFLAGS           += -l${LIB_CPPUNIT_QTUI}
 EXE                     = carobTestLauncher
 
 # to run against a mysql cluster (changes user/pass and requests)
@@ -65,14 +65,14 @@
 
 # Cannot use LDLIBS here since it is already used to build libcarob.so
 ${EXE}: ${TESTOBJS} CarobTestLauncher.o ${LIB_CAROB_SO}
-       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} ${TEST_LDFLAGS} ${CLIENT_LDLIBS} -o $@
+       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} ${TEST_LDFLAGS} -lcppunit 
${CLIENT_LDLIBS} -o $@
 
 ${LIB_CAROB_SO} ${LIB_CAROB_A}:
        ${MAKE} -C ${CAROB_ROOT}
 
 # use this when compiling with mingw
 static: ${TESTOBJS} CarobTestLauncher.o ${LIB_CAROB_A}
-       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} -lgmp ${LDLIBS} ${CLIENT_LDLIBS} -o $@
+       ${CXX} ${CXXFLAGS} $^ ${LDFLAGS} -lgmp -lcppunit ${LDLIBS} 
${CLIENT_LDLIBS} -o $@
 
 clean:
        ${RM} ${TESTOBJS} CarobTestLauncher.o ${EXE}
@@ -84,3 +84,24 @@
 
 distclean: clean
        ${RM} testslist
+
+
+   ########## CHECKS ##############"
+
+check: checkstatic checklib
+
+clean-check:
+       ${RM} checkstatic checklib
+
+# Link a empty executable to our lib
+# Useful to detect unresolved symbols in our lib
+checklib:  ${LIB_CAROB_SO}
+       - ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${LDFLAGS} 
${TEST_LDFLAGS} ${CLIENT_LDLIBS} -o $@
+       ${LDD} ./$< ./$@
+       ./$@
+
+checkstatic: ${LIB_CAROB_A}
+       ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${LDFLAGS} ${LDLIBS} 
${CLIENT_LDLIBS} -o $@
+       ${LDD} ./$@
+       ./$@
+
Index: carob/test/dummymain.cpp
diff -u /dev/null carob/test/dummymain.cpp:1.1
--- /dev/null   Mon Jan 22 12:09:35 2007
+++ carob/test/dummymain.cpp    Mon Jan 22 12:09:35 2007
@@ -0,0 +1,27 @@
+
+#include "Connection.hpp"
+
+#ifdef CAROB_LOG4CXX_NAME
+#include <log4cxx/logger.h>
+#include <log4cxx/basicconfigurator.h>
+#endif
+
+#include <vector>
+
+int main()
+{
+#ifdef CAROB_LOG4CXX_NAME
+  // Set up a simple configuration that logs on the console.
+  log4cxx::BasicConfigurator::configure();
+#endif
+
+  // ensure we pull out some symbols
+  std::vector<CarobNS::ControllerInfo> ctrls;
+  ctrls.push_back(CarobNS::ControllerInfo(L"192.168.0.39", 25322));
+  
+  CarobNS::ConnectionParameters connectionPrms(ctrls,
+                                      L"myDB",
+                                      L"user",
+                                      L"");
+  return 0;
+}

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to