Add a working 'make check' target, which runs both the test suite in src/test-harness, and all the twtest unit tests; update unit test binary to return standard success/fail values, to keep make happy
This commit is contained in:
parent
2e39db661b
commit
062523a60e
|
@ -11,3 +11,8 @@ install-data-hook:
|
||||||
uninstall-hook:
|
uninstall-hook:
|
||||||
rm -f ${prefix}/sbin/tripwire $(prefix)/sbin/twadmin $(prefix)/sbin/twprint $(prefix)/sbin/siggen
|
rm -f ${prefix}/sbin/tripwire $(prefix)/sbin/twadmin $(prefix)/sbin/twprint $(prefix)/sbin/siggen
|
||||||
rm -Rf $(prefix)/doc
|
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
|
||||||
|
|
|
@ -808,6 +808,11 @@ uninstall-hook:
|
||||||
rm -f ${prefix}/sbin/tripwire $(prefix)/sbin/twadmin $(prefix)/sbin/twprint $(prefix)/sbin/siggen
|
rm -f ${prefix}/sbin/tripwire $(prefix)/sbin/twadmin $(prefix)/sbin/twprint $(prefix)/sbin/siggen
|
||||||
rm -Rf $(prefix)/doc
|
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.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
|
@ -316,11 +316,13 @@ int _tmain(int argc, TCHAR** argv)
|
||||||
{
|
{
|
||||||
cTWUtil::PrintErrorMsg(error);
|
cTWUtil::PrintErrorMsg(error);
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
TCERR << _T("Unhandled exception caught!");
|
TCERR << _T("Unhandled exception caught!");
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure all the refrence counted objects have been destroyed
|
// make sure all the refrence counted objects have been destroyed
|
||||||
|
@ -329,7 +331,9 @@ int _tmain(int argc, TCHAR** argv)
|
||||||
|
|
||||||
// force user to hit <CR>
|
// force user to hit <CR>
|
||||||
|
|
||||||
return 1;
|
std::cout << std::endl << "Tests completed" << std::endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue