From: Russ Combs Date: Wed, 9 Sep 2015 19:11:26 +0000 (-0400) Subject: fix non-unit-test builds X-Git-Tag: 3.0.0-233~843 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df24ff436439041a20d75e504845663d58fff4e6;p=thirdparty%2Fsnort3.git fix non-unit-test builds --- diff --git a/src/filters/sfrf.cc b/src/filters/sfrf.cc index 69adc5576..901b90feb 100644 --- a/src/filters/sfrf.cc +++ b/src/filters/sfrf.cc @@ -832,6 +832,8 @@ static tSFRFTrackingNode* _getSFRFTrackingNode( return dynNode; } +#ifdef UNIT_TEST // FIXIT-L see sfip/sf_ip.cc #include "sfrf_test.cc" +#endif diff --git a/src/filters/sfthd.cc b/src/filters/sfthd.cc index f6dfb44cd..a7c31520c 100644 --- a/src/filters/sfthd.cc +++ b/src/filters/sfthd.cc @@ -1331,6 +1331,8 @@ int sfthd_show_objects(ThresholdObjects* thd_objs) #endif // THD_DEBUG +#ifdef UNIT_TEST // FIXIT-L see sfip/sf_ip.cc #include "sfthd_test.cc" +#endif diff --git a/src/lua/lua.cc b/src/lua/lua.cc index 9bd67bd11..e72c4be67 100644 --- a/src/lua/lua.cc +++ b/src/lua/lua.cc @@ -58,5 +58,8 @@ ManageStack::~ManageStack() } } +#ifdef UNIT_TEST +// FIXIT-L see sfip/sf_ip.cc #include "lua_stack_test.cc" +#endif diff --git a/src/sfip/sf_ip.cc b/src/sfip/sf_ip.cc index 23c5717e6..eca5a3ed1 100644 --- a/src/sfip/sf_ip.cc +++ b/src/sfip/sf_ip.cc @@ -661,7 +661,10 @@ int sfip_ismapped(const sfip_t* ip) return 1; } +#ifdef UNIT_TEST // FIXIT-L this is a hack to get catch to run these tests -// otherwise just acts like they aren't there +// otherwise the linker omits the auto registration foo +// and the tests will not run #include "sfip_test.cc" +#endif diff --git a/src/sfrt/sfrt.cc b/src/sfrt/sfrt.cc index fc5322161..b79335977 100644 --- a/src/sfrt/sfrt.cc +++ b/src/sfrt/sfrt.cc @@ -817,6 +817,8 @@ int main() #endif /* DEBUG_SFRT */ +#ifdef UNIT_TEST // FIXIT-L see sfip/sf_ip.cc #include "sfrt_test.cc" +#endif