Add unit tests to Unix build
authorScott Cantor <cantor.2@osu.edu>
Thu, 2 Mar 2006 21:54:21 +0000 (21:54 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 2 Mar 2006 21:54:21 +0000 (21:54 +0000)
Makefile.am
configure.ac
xmltoolingtest/Makefile.am [new file with mode: 0644]

index ba80dca..d56ad40 100644 (file)
@@ -13,7 +13,7 @@ EXTRA_DIST =
 dist-hook:
        rm -rf `find $(distdir)/schemas -name Makefile`
 
-SUBDIRS = schemas xmltooling
+SUBDIRS = schemas xmltooling xmltoolingtest
 
 #all-local: opensaml.spec pkginfo
 #
index 8c6ee99..a08e631 100644 (file)
@@ -199,4 +199,4 @@ AC_SUBST(CXXTESTFLAGS)
 AM_CONDITIONAL(BUILD_UNITTEST,test -f ${CXXTEST})
 
 # output makefiles
-AC_OUTPUT(Makefile xmltooling/Makefile schemas/Makefile)
+AC_OUTPUT(Makefile xmltooling/Makefile xmltoolingtest/Makefile schemas/Makefile)
diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
new file mode 100644 (file)
index 0000000..041b563
--- /dev/null
@@ -0,0 +1,34 @@
+AUTOMAKE_OPTIONS = foreign\r
+\r
+if BUILD_UNITTEST\r
+bin_PROGRAMS = xmltoolingtest\r
+xmltoolingtest_CXXFLAGS = $(CXXFLAGS) $(CXXTESTFLAGS)\r
+bin_PROGRAMS = \r
+endif\r
+\r
+xmltoolingtest_h = \\r
+       xmltoolingtest.h \\r
+       MarshallingTest.h \\r
+       UnknownText.h \\r
+       UnmarshallingTest.h\r
+\r
+noinst_HEADERS = \\r
+       XMLObjectBaseTestCase.h\r
+\r
+nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)\r
+\r
+CLEANFILES = $(nodist_xmltoolingtest_SOURCES)\r
+\r
+do-cxxtestgen:\r
+       if test $(HFILE) = "xmltoolingtest.h"; then \\r
+               $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \\r
+       else \\r
+               $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \\r
+       fi;\r
+\r
+$(nodist_xmltoolingtest_SOURCES): %.cpp: %.h\r
+       $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@\r
+\r
+xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la\r
+\r
+EXTRA_DIST = xmltoolingtest.vcproj $(xmltoolingtest_h) data\r