diff --git a/CMakeLists.txt b/CMakeLists.txt index b09820a..8cbc60e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,9 @@ endif() project(webcc) -option(WEBCC_ENABLE_TEST "Build test?" ON) -option(WEBCC_ENABLE_UNITTEST "Build unit test?" ON) -option(WEBCC_ENABLE_EXAMPLES "Build examples?" ON) +option(WEBCC_ENABLE_AUTOTEST "Build automation test?" OFF) +option(WEBCC_ENABLE_UNITTEST "Build unit test?" OFF) +option(WEBCC_ENABLE_EXAMPLES "Build examples?" OFF) if(WIN32) option(WEBCC_ENABLE_VLD "Enable VLD (Visual Leak Detector)?" OFF) @@ -139,8 +139,8 @@ if(WEBCC_ENABLE_EXAMPLES) add_subdirectory(examples) endif() -if(WEBCC_ENABLE_TEST) - add_subdirectory(test) +if(WEBCC_ENABLE_AUTOTEST) + add_subdirectory(autotest) endif() if(WEBCC_ENABLE_UNITTEST) diff --git a/test/CMakeLists.txt b/autotest/CMakeLists.txt similarity index 68% rename from test/CMakeLists.txt rename to autotest/CMakeLists.txt index 6623ea1..e3771ac 100644 --- a/test/CMakeLists.txt +++ b/autotest/CMakeLists.txt @@ -1,4 +1,10 @@ -# Tests +# Auto test + +set(AT_SRCS + test_http_client.cc + ) + +set(AT_TARGET_NAME webcc_autotest) # Common libraries to link. set(TEST_LIBS webcc ${Boost_LIBRARIES} "${CMAKE_THREAD_LIBS_INIT}") @@ -18,5 +24,5 @@ if(UNIX) set(TEST_LIBS ${TEST_LIBS} ${CMAKE_DL_LIBS}) endif() -add_executable(test_http_client test_http_client.cc) -target_link_libraries(test_http_client gtest jsoncpp ${TEST_LIBS}) +add_executable(${AT_TARGET_NAME} ${AT_SRCS}) +target_link_libraries(${AT_TARGET_NAME} webcc gtest ${TEST_LIBS}) diff --git a/test/test_http_client.cc b/autotest/test_http_client.cc similarity index 100% rename from test/test_http_client.cc rename to autotest/test_http_client.cc diff --git a/doc/screenshots/vs_cmd_prompts.png b/doc/screenshots/vs_cmd_prompts.png new file mode 100644 index 0000000..28fc3d1 Binary files /dev/null and b/doc/screenshots/vs_cmd_prompts.png differ diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt index 13138de..28fe0f4 100644 --- a/unittest/CMakeLists.txt +++ b/unittest/CMakeLists.txt @@ -1,4 +1,5 @@ # Unit test + set(UT_SRCS base64_test.cc http_parser_test.cc