Browse Source

Easing to build and debug unit test locally

bel2125 8 years ago
parent
commit
00f5b51bac
2 changed files with 4 additions and 1 deletions
  1. 2 0
      test/civetweb_check.h
  2. 2 1
      test/public_server.c

+ 2 - 0
test/civetweb_check.h

@@ -42,8 +42,10 @@
 #include "check.h"
 
 #if (CHECK_MINOR_VERSION < 11)
+#ifndef LOCAL_TEST
 #error "CivetWeb unit tests require at least check 0.11.0"
 #endif
+#endif
 
 #ifdef __clang__
 #pragma clang diagnostic pop

+ 2 - 1
test/public_server.c

@@ -4428,7 +4428,8 @@ make_public_server_suite(void)
 #ifdef REPLACE_CHECK_FOR_LOCAL_DEBUGGING
 /* Used to debug test cases without using the check framework */
 /* Build command for Linux:
-gcc test/public_server.c src/civetweb.c -I include/ -I test/ -l pthread -l dl -D LOCAL_TEST -D REPLACE_CHECK_FOR_LOCAL_DEBUGGING -D MAIN_PUBLIC_SERVER=main
+gcc test/public_server.c src/civetweb.c -I include/ -I test/ -l pthread -l dl -D
+LOCAL_TEST -D REPLACE_CHECK_FOR_LOCAL_DEBUGGING -D MAIN_PUBLIC_SERVER=main
 */
 
 static int chk_ok = 0;