diff options
author | deva <deva> | 2009-07-24 13:57:25 +0000 |
---|---|---|
committer | deva <deva> | 2009-07-24 13:57:25 +0000 |
commit | 719401aa5ecbbd19c36e7b215761a81714dd3f40 (patch) | |
tree | 0d19b5fdb2fb076a08242f175a6f5ba9fdcdeac8 | |
parent | e26074442408477170f13652407fe7ac2714a737 (diff) |
Made test section able to retest when some dependencies changed.
-rw-r--r-- | server/src/Makefile.am | 141 |
1 files changed, 113 insertions, 28 deletions
diff --git a/server/src/Makefile.am b/server/src/Makefile.am index bb791aa..3fa0aad 100644 --- a/server/src/Makefile.am +++ b/server/src/Makefile.am @@ -97,6 +97,10 @@ EXTRA_DIST = \ widgetgenerator.h \ xml_encode_decode.h +################ +# Test Section # +################ + TESTFILES = \ test_versionstr \ test_macrolist \ @@ -111,12 +115,16 @@ TESTFILES = \ test_xml_encode_decode \ test_journal_commit - TESTLOGS = `for F in ${TESTFILES}; do echo $$F.log; done` -BASICS = "-I.. -DHAVE_CONFIG_H exception.cc log.cc debug.cc configuration.cc utf8.cc" -PARSERBASICS = "saxparser.cc -lexpat" -DBBASICS = "database.cc pracrodao.cc pracrodaopgsql.cc $(PQXX_LIBS) $(PQXX_CXXFLAGS)" +BASICFILES = exception.cc log.cc debug.cc configuration.cc utf8.cc +BASICFLAGS = -I.. -DHAVE_CONFIG_H + +PARSERFILES = saxparser.cc +PARSERFLAGS = -lexpat + +DBFILES = database.cc pracrodao.cc pracrodaopgsql.cc +DBFLAGS = $(PQXX_LIBS) $(PQXX_CXXFLAGS) test: $(TESTFILES) @echo "All tests done." @@ -124,41 +132,118 @@ test: $(TESTFILES) test_clean: rm -f $(TESTFILES) -test_versionstr: versionstr.cc - @../../tools/test versionstr.cc $(BASICS) +TEST_VERSIONSTR_FILES = \ + versionstr.cc \ + $(BASICFILES) +test_versionstr: $(TEST_VERSIONSTR_FILES) + @../../tools/test $(TEST_VERSIONSTR_FILES) $(BASICFLAGS) -test_macrolist: macrolist.cc - @../../tools/test macrolist.cc versionstr.cc macroheaderparser.cc $(PARSERBASICS) $(BASICS) +TEST_MACROLIST_FILES = \ + macrolist.cc \ + versionstr.cc \ + macroheaderparser.cc \ + $(PARSERFILES) \ + $(BASICFILES) +test_macrolist: $(TEST_MACROLIST_FILES) + @../../tools/test $(TEST_MACROLIST_FILES) $(PARSERFLAGS) $(BASICFLAGS) -test_queryhandlerpentominos: queryhandlerpentominos.cc - @../../tools/test queryhandlerpentominos.cc tcpsocket.cc queryparser.cc $(PARSERBASICS) $(BASICS) +TEST_QUERYHANDLERPENTOMINOS_FILES = \ + queryhandlerpentominos.cc \ + tcpsocket.cc \ + queryparser.cc \ + $(PARSERFILES) \ + $(BASICFILES) +test_queryhandlerpentominos: $(TEST_QUERYHANDLERPENTOMINOS_FILES) + @../../tools/test $(TEST_QUERYHANDLERPENTOMINOS_FILES) $(PARSERFLAGS) $(BASICFLAGS) -test_queryhandlerpracro: queryhandlerpracro.cc - @../../tools/test queryhandlerpracro.cc tcpsocket.cc queryparser.cc $(DBBASICS) $(PARSERBASICS) $(BASICS) +TEST_QUERYHANDLERPRACRO_FILES = \ + queryhandlerpracro.cc \ + tcpsocket.cc \ + queryparser.cc \ + $(DBFILES) \ + $(PARSERFILES) \ + $(BASICFILES) +test_queryhandlerpracro: $(TEST_QUERYHANDLERPRACRO_FILES) + @../../tools/test $(TEST_QUERYHANDLERPRACRO_FILES) $(DBFLAGS) $(PARSERFLAGS) $(BASICFLAGS) -test_queryparser: queryparser.cc - @../../tools/test queryparser.cc queryhandlerpentominos.cc tcpsocket.cc $(BASICS) $(PARSERBASICS) +TEST_QUERYPARSER_FILES = \ + queryparser.cc \ + queryhandlerpentominos.cc \ + tcpsocket.cc \ + $(BASICFILES) \ + $(PARSERFILES) +test_queryparser: $(TEST_QUERYPARSER_FILES) + @../../tools/test $(TEST_QUERYPARSER_FILES) $(BASICFLAGS) $(PARSERFLAGS) -test_luaquerymapper: luaquerymapper.cc - @../../tools/test luaquerymapper.cc queryparser.cc queryhandlerpentominos.cc tcpsocket.cc $(BASICS) $(PARSERBASICS) $(LUA_LIBS) +TEST_LUAQUERMAPPER_FILES = \ + luaquerymapper.cc \ + queryparser.cc \ + queryhandlerpentominos.cc \ + tcpsocket.cc \ + $(BASICFILES) \ + $(PARSERFILES) +test_luaquerymapper: $(TEST_LUAQUERMAPPER_FILES) + @../../tools/test $(TEST_LUAQUERMAPPER_FILES) $(LUA_LIBS) $(BASICFLAGS) $(PARSERFLAGS) -test_templateparser: templateparser.cc - @../../tools/test templateparser.cc $(PARSERBASICS) $(BASICS) +TEST_TEMPLATEPARSER_FILES = \ + templateparser.cc \ + $(PARSERFILES) \ + $(BASICFILES) +test_templateparser: $(TEST_TEMPLATEPARSER_FILES) + @../../tools/test $(TEST_TEMPLATEPARSER_FILES) $(BASICFLAGS) $(PARSERFLAGS) -test_macroparser: macroparser.cc - @../../tools/test macroparser.cc $(PARSERBASICS) $(BASICS) +TEST_MACROPARSER_FILES = \ + macroparser.cc \ + $(PARSERFILES) \ + $(BASICFILES) +test_macroparser: $(TEST_MACROPARSER_FILES) + @../../tools/test $(TEST_MACROPARSER_FILES) $(BASICFLAGS) $(PARSERFLAGS) -test_server: server.cc - @../../tools/test server.cc templateparser.cc queryparser.cc queryhandlerpentominos.cc journal_commit.cc macrolist.cc queryhandlerpracro.cc macroheaderparser.cc versionstr.cc resumeparser.cc luaquerymapper.cc tcpsocket.cc $(BASICS) transactionparser.cc widgetgenerator.cc database.cc pracrodao.cc pracrodaopgsql.cc luaresume.cc macroparser.cc xml_encode_decode.cc $(PARSERBASICS) $(LUA_LIBS) $(CONFIG_LIBS) $(PQXX_LIBS) $(PQXX_CXXFLAGS) +TEST_SERVER_FILES = \ + server.cc \ + templateparser.cc \ + queryparser.cc \ + queryhandlerpentominos.cc \ + journal_commit.cc \ + macrolist.cc \ + queryhandlerpracro.cc \ + macroheaderparser.cc \ + versionstr.cc \ + resumeparser.cc \ + luaquerymapper.cc \ + tcpsocket.cc \ + transactionparser.cc \ + widgetgenerator.cc \ + database.cc \ + pracrodao.cc \ + pracrodaopgsql.cc \ + luaresume.cc \ + macroparser.cc \ + xml_encode_decode.cc \ + $(PARSERFILES) \ + $(BASICFILES) +test_server: $(TEST_SERVER_FILES) + @../../tools/test $(TEST_SERVER_FILES) $(BASICFLAGS) $(LUA_LIBS) $(DBFLAGS) $(PARSERFLAGS) @sleep 1s; killall -9 test_server -test_pracrodaopgsql: pracrodaopgsql.cc - @../../tools/test pracrodaopgsql.cc pracrodao.cc $(BASICS) $(PQXX_LIBS) $(PQXX_CXXFLAGS) -I.. +TEST_PRACRODAOPGSQL_FILES = \ + pracrodaopgsql.cc \ + pracrodao.cc \ + $(BASICFILES) +test_pracrodaopgsql: $(TEST_PRACRODAOPGSQL_FILES) + @../../tools/test $(TEST_PRACRODAOPGSQL_FILES) $(DBFLAGS) $(BASICFLAGS) -test_xml_encode_decode: xml_encode_decode.cc - @../../tools/test xml_encode_decode.cc +TEST_XMLENCODEDECODE_FILES = \ + xml_encode_decode.cc +test_xml_encode_decode: $(TEST_XMLENCODEDECODE_FILES) + @../../tools/test $(TEST_XMLENCODEDECODE_FILES) -test_journal_commit: journal_commit.cc - @../../tools/test journal_commit.cc templateparser.cc $(PARSERBASICS) $(BASICS) +TEST_JOURNALCOMMIT_FILES = \ + journal_commit.cc \ + templateparser.cc \ + $(PARSERFILES) \ + $(BASICFILES) +test_journal_commit: $(TEST_JOURNALCOMMIT_FILES) + @../../tools/test $(TEST_JOURNALCOMMIT_FILES) $(PARSERFLAGS) $(BASICFLAGS) CLEANFILES = $(TESTFILES) $(TESTLOGS) *~ |