diff --git a/Makefile.am b/Makefile.am index 097fe7c..e72b1ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,3 +11,8 @@ install-data-hook: uninstall-hook: rm -f ${prefix}/sbin/tripwire $(prefix)/sbin/twadmin $(prefix)/sbin/twprint $(prefix)/sbin/siggen rm -Rf $(prefix)/doc + +check: + rm -Rf $(top_srcdir)/src/test-harness/twtest + cd $(top_srcdir)/src/test-harness && ./twtest.pl + $(top_srcdir)/bin/twtest all diff --git a/Makefile.in b/Makefile.in index 4c462b6..5586cce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -808,6 +808,11 @@ uninstall-hook: rm -f ${prefix}/sbin/tripwire $(prefix)/sbin/twadmin $(prefix)/sbin/twprint $(prefix)/sbin/siggen rm -Rf $(prefix)/doc +check: + rm -Rf $(top_srcdir)/src/test-harness/twtest + cd $(top_srcdir)/src/test-harness && ./twtest.pl + $(top_srcdir)/bin/twtest all + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/twtest/test.cpp b/src/twtest/test.cpp index c77e7ff..4bdc1df 100644 --- a/src/twtest/test.cpp +++ b/src/twtest/test.cpp @@ -316,11 +316,13 @@ int _tmain(int argc, TCHAR** argv) { cTWUtil::PrintErrorMsg(error); ASSERT(false); + return 1; } catch (...) { TCERR << _T("Unhandled exception caught!"); ASSERT(false); + return 1; } // make sure all the refrence counted objects have been destroyed @@ -329,7 +331,9 @@ int _tmain(int argc, TCHAR** argv) // force user to hit - return 1; + std::cout << std::endl << "Tests completed" << std::endl; + + return 0; }