Browse Source

Move unit test to a new directory

The current "test" directory was a mixture of automatic unit tests,
content for manual tests and example web paged.
Move the source for automatic unit tests (CI tests) to a new
directory.
bel2125 7 years ago
parent
commit
77f9d5d317

+ 1 - 1
CMakeLists.txt

@@ -480,7 +480,7 @@ if (CIVETWEB_BUILD_TESTING)
   mark_as_advanced(CIVETWEB_CHECK_MD5_HASH)
   mark_as_advanced(CIVETWEB_CHECK_MD5_HASH)
 
 
   # Build the testing
   # Build the testing
-  add_subdirectory(test)
+  add_subdirectory(unittest)
 endif()
 endif()
 
 
 # Set up CPack
 # Set up CPack

+ 1 - 1
test/CMakeLists.txt → unittest/CMakeLists.txt

@@ -222,7 +222,7 @@ if (${CMAKE_BUILD_TYPE} MATCHES "[Cc]overage")
       COMMAND ${CTEST_EXECUTABLE} --force-new-ctest-process
       COMMAND ${CTEST_EXECUTABLE} --force-new-ctest-process
       COMMAND ${LCOV_EXECUTABLE} -q --no-external -c -b "${CMAKE_SOURCE_DIR}" -d . -o after.lcov
       COMMAND ${LCOV_EXECUTABLE} -q --no-external -c -b "${CMAKE_SOURCE_DIR}" -d . -o after.lcov
       COMMAND ${LCOV_EXECUTABLE} -q -a before.lcov -a after.lcov --output-file final.lcov
       COMMAND ${LCOV_EXECUTABLE} -q -a before.lcov -a after.lcov --output-file final.lcov
-      COMMAND ${LCOV_EXECUTABLE} -q -r final.lcov "'${CMAKE_SOURCE_DIR}/test/*'" -o final.lcov
+      COMMAND ${LCOV_EXECUTABLE} -q -r final.lcov "'${CMAKE_SOURCE_DIR}/unittest/*'" -o final.lcov
       COMMAND ${GENHTML_EXECUTABLE} final.lcov -o lcov --demangle-cpp --sort -p "${CMAKE_SOURCE_DIR}" -t benchmark
       COMMAND ${GENHTML_EXECUTABLE} final.lcov -o lcov --demangle-cpp --sort -p "${CMAKE_SOURCE_DIR}" -t benchmark
       DEPENDS main-c-unit-test
       DEPENDS main-c-unit-test
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}

+ 0 - 0
test/cgi_test.c → unittest/cgi_test.c


+ 0 - 0
test/civetweb_check.h → unittest/civetweb_check.h


+ 0 - 0
test/embed.c → unittest/embed.c


+ 0 - 0
test/main.c → unittest/main.c


+ 0 - 0
test/private.c → unittest/private.c


+ 0 - 0
test/private.h → unittest/private.h


+ 0 - 0
test/private_exe.c → unittest/private_exe.c


+ 0 - 0
test/private_exe.h → unittest/private_exe.h


+ 0 - 0
test/public_func.c → unittest/public_func.c


+ 0 - 0
test/public_func.h → unittest/public_func.h


+ 0 - 0
test/public_server.c → unittest/public_server.c


+ 0 - 0
test/public_server.h → unittest/public_server.h


+ 0 - 0
test/shared.c → unittest/shared.c


+ 0 - 0
test/shared.h → unittest/shared.h


+ 0 - 0
test/testclient.c → unittest/testclient.c


+ 0 - 0
test/timertest.c → unittest/timertest.c


+ 0 - 0
test/timertest.h → unittest/timertest.h