]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fix non-unit-test builds
authorRuss Combs <rucombs@cisco.com>
Wed, 9 Sep 2015 19:11:26 +0000 (15:11 -0400)
committerRuss Combs <rucombs@cisco.com>
Wed, 9 Sep 2015 19:11:26 +0000 (15:11 -0400)
src/filters/sfrf.cc
src/filters/sfthd.cc
src/lua/lua.cc
src/sfip/sf_ip.cc
src/sfrt/sfrt.cc

index 69adc557628c2e4c4b03502a8a55fd272b048213..901b90feb53863af40148d8ae991a3d7cdc9a22d 100644 (file)
@@ -832,6 +832,8 @@ static tSFRFTrackingNode* _getSFRFTrackingNode(
     return dynNode;
 }
 
+#ifdef UNIT_TEST
 // FIXIT-L see sfip/sf_ip.cc
 #include "sfrf_test.cc"
+#endif
 
index f6dfb44cd213cc12ba4d3d64146bce9f260af8a4..a7c31520c9c459de979542a0b32ad620855408c1 100644 (file)
@@ -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
 
index 9bd67bd1119119f05cc9bb27f3bed19c336bb55c..e72c4be67f45070c285ff9240c968b230c813b1c 100644 (file)
@@ -58,5 +58,8 @@ ManageStack::~ManageStack()
 }
 }
 
+#ifdef UNIT_TEST
+// FIXIT-L see sfip/sf_ip.cc
 #include "lua_stack_test.cc"
+#endif
 
index 23c5717e6944f1e81e607ef93233e0ebd436de8d..eca5a3ed1b7e2a2c0bcdb79862fef5ac86d9be0b 100644 (file)
@@ -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
 
index fc5322161343735685b52d478acd5cdc5b2f0864..b793359775f2518780359bf0e3a5d44bb2b4c895 100644 (file)
@@ -817,6 +817,8 @@ int main()
 
 #endif /* DEBUG_SFRT */
 
+#ifdef UNIT_TEST
 // FIXIT-L see sfip/sf_ip.cc
 #include "sfrt_test.cc"
+#endif