From db144840aba95affb3a6b5b2536059f49f0677ff Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 17 Feb 2011 11:00:14 +0000 Subject: Rewrite of all old tests to new unittest framework. Also some work on testdb; more to come... --- server/src/admin_export.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'server/src/admin_export.cc') diff --git a/server/src/admin_export.cc b/server/src/admin_export.cc index 9475bc3..3ec77d1 100644 --- a/server/src/admin_export.cc +++ b/server/src/admin_export.cc @@ -36,7 +36,7 @@ #include #include -#include "macrotool/fieldnamescanner.h" +#include "fieldnamescanner.h" #include "configuration.h" #define SEP "\t" @@ -255,18 +255,23 @@ static std::string do_export(std::string templ, bool *ok) std::string admin_export(Environment &env, std::string templ, bool *ok) { +#ifndef WITHOUT_DB return do_export(templ, ok); +#else + return "No database available"; +#endif/* WITHOUT_DB */ } #ifdef TEST_ADMIN_EXPORT -//deps: -//cflags: -//libs: +//deps: environment.cc connectionpool.cc mutex.cc semaphore.cc configuration.cc entitylist.cc artefact.cc database.cc pracrodao.cc pracrodaotest.cc pracrodaopgsql.cc templatelist.cc macrolist.cc debug.cc macroheaderparser.cc exception.cc log.cc saxparser.cc templateheaderparser.cc versionstr.cc inotify.cc session.cc sessionserialiser.cc journal.cc journal_uploadserver.cc journal_commit.cc xml_encode_decode.cc sessionparser.cc fieldnamescanner.cc util.cc macroparser.cc templateparser.cc +//cflags: -I.. -DWITHOUT_ARTEFACT $(PQXX_CFLAGS) $(EXPAT_CFLAGS) +//libs: $(PQXX_LIBS) $(EXPAT_LIBS) #include "test.h" TEST_BEGIN; // TODO: Put some testcode here (see test.h for usable macros). +TEST_TRUE(false, "No tests yet!"); TEST_END; -- cgit v1.2.3