diff --git a/.gitmodules b/.gitmodules index f6ba8fa..cff731d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "servant/protocol"] path = servant/protocol url = https://github.com/TarsCloud/TarsProtocol.git +[submodule "unittest"] + path = unittest + url = https://github.com/TarsCloud/tars-unittest.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 43a1f0e..157dd9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ set(MYSQL_DIR_LIB "/usr/local/mysql/lib") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O2 -Wall -Wno-deprecated") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -Wno-deprecated") +#for coverage statistics +#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O2 -Wall -Wno-deprecated -fprofile-arcs -ftest-coverage") +#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -Wno-deprecated -fprofile-arcs -ftest-coverage") + #set(CMAKE_BUILD_TYPE "Debug") set(TARS_VERSION "1.1.0") diff --git a/test/CMakeLists.txt b/test_deprecated/CMakeLists.txt similarity index 100% rename from test/CMakeLists.txt rename to test_deprecated/CMakeLists.txt diff --git a/test/README.md b/test_deprecated/README.md similarity index 100% rename from test/README.md rename to test_deprecated/README.md diff --git a/test/testFramework/CMakeLists.txt b/test_deprecated/testFramework/CMakeLists.txt similarity index 100% rename from test/testFramework/CMakeLists.txt rename to test_deprecated/testFramework/CMakeLists.txt diff --git a/test/testFramework/testAdminRegistry/CMakeLists.txt b/test_deprecated/testFramework/testAdminRegistry/CMakeLists.txt similarity index 100% rename from test/testFramework/testAdminRegistry/CMakeLists.txt rename to test_deprecated/testFramework/testAdminRegistry/CMakeLists.txt diff --git a/test/testFramework/testAdminRegistry/main.cpp b/test_deprecated/testFramework/testAdminRegistry/main.cpp similarity index 100% rename from test/testFramework/testAdminRegistry/main.cpp rename to test_deprecated/testFramework/testAdminRegistry/main.cpp diff --git a/test/testServant/CMakeLists.txt b/test_deprecated/testServant/CMakeLists.txt similarity index 100% rename from test/testServant/CMakeLists.txt rename to test_deprecated/testServant/CMakeLists.txt diff --git a/test/testServant/testTarsAnalyzer/CMakeLists.txt b/test_deprecated/testServant/testTarsAnalyzer/CMakeLists.txt similarity index 100% rename from test/testServant/testTarsAnalyzer/CMakeLists.txt rename to test_deprecated/testServant/testTarsAnalyzer/CMakeLists.txt diff --git a/test/testServant/testTarsAnalyzer/main.cpp b/test_deprecated/testServant/testTarsAnalyzer/main.cpp similarity index 100% rename from test/testServant/testTarsAnalyzer/main.cpp rename to test_deprecated/testServant/testTarsAnalyzer/main.cpp diff --git a/test/testServant/testTarsAnalyzer/tarsAnalyzer.cpp b/test_deprecated/testServant/testTarsAnalyzer/tarsAnalyzer.cpp similarity index 100% rename from test/testServant/testTarsAnalyzer/tarsAnalyzer.cpp rename to test_deprecated/testServant/testTarsAnalyzer/tarsAnalyzer.cpp diff --git a/test/testServant/testTarsAnalyzer/tarsAnalyzer.h b/test_deprecated/testServant/testTarsAnalyzer/tarsAnalyzer.h similarity index 100% rename from test/testServant/testTarsAnalyzer/tarsAnalyzer.h rename to test_deprecated/testServant/testTarsAnalyzer/tarsAnalyzer.h diff --git a/test/testServant/testTarsAnalyzer/tupRequestF.h b/test_deprecated/testServant/testTarsAnalyzer/tupRequestF.h similarity index 100% rename from test/testServant/testTarsAnalyzer/tupRequestF.h rename to test_deprecated/testServant/testTarsAnalyzer/tupRequestF.h diff --git a/test/testServant/testTup/CMakeLists.txt b/test_deprecated/testServant/testTup/CMakeLists.txt similarity index 100% rename from test/testServant/testTup/CMakeLists.txt rename to test_deprecated/testServant/testTup/CMakeLists.txt diff --git a/test/testServant/testTup/UserInfo.h b/test_deprecated/testServant/testTup/UserInfo.h similarity index 100% rename from test/testServant/testTup/UserInfo.h rename to test_deprecated/testServant/testTup/UserInfo.h diff --git a/test/testServant/testTup/UserInfo.tars b/test_deprecated/testServant/testTup/UserInfo.tars similarity index 100% rename from test/testServant/testTup/UserInfo.tars rename to test_deprecated/testServant/testTup/UserInfo.tars diff --git a/test/testServant/testTup/main.cpp b/test_deprecated/testServant/testTup/main.cpp similarity index 100% rename from test/testServant/testTup/main.cpp rename to test_deprecated/testServant/testTup/main.cpp diff --git a/test/testUtil/CMakeLists.txt b/test_deprecated/testUtil/CMakeLists.txt similarity index 100% rename from test/testUtil/CMakeLists.txt rename to test_deprecated/testUtil/CMakeLists.txt diff --git a/test/testUtil/example_tc_autoptr.cpp b/test_deprecated/testUtil/example_tc_autoptr.cpp similarity index 100% rename from test/testUtil/example_tc_autoptr.cpp rename to test_deprecated/testUtil/example_tc_autoptr.cpp diff --git a/test/testUtil/example_tc_bitmap.cpp b/test_deprecated/testUtil/example_tc_bitmap.cpp similarity index 100% rename from test/testUtil/example_tc_bitmap.cpp rename to test_deprecated/testUtil/example_tc_bitmap.cpp diff --git a/test/testUtil/example_tc_cgi.cpp b/test_deprecated/testUtil/example_tc_cgi.cpp similarity index 100% rename from test/testUtil/example_tc_cgi.cpp rename to test_deprecated/testUtil/example_tc_cgi.cpp diff --git a/test/testUtil/example_tc_common.cpp b/test_deprecated/testUtil/example_tc_common.cpp similarity index 100% rename from test/testUtil/example_tc_common.cpp rename to test_deprecated/testUtil/example_tc_common.cpp diff --git a/test/testUtil/example_tc_config.cpp b/test_deprecated/testUtil/example_tc_config.cpp similarity index 100% rename from test/testUtil/example_tc_config.cpp rename to test_deprecated/testUtil/example_tc_config.cpp diff --git a/test/testUtil/example_tc_encoder.cpp b/test_deprecated/testUtil/example_tc_encoder.cpp similarity index 100% rename from test/testUtil/example_tc_encoder.cpp rename to test_deprecated/testUtil/example_tc_encoder.cpp diff --git a/test/testUtil/example_tc_file.cpp b/test_deprecated/testUtil/example_tc_file.cpp similarity index 100% rename from test/testUtil/example_tc_file.cpp rename to test_deprecated/testUtil/example_tc_file.cpp diff --git a/test/testUtil/example_tc_file_lock.cpp b/test_deprecated/testUtil/example_tc_file_lock.cpp similarity index 100% rename from test/testUtil/example_tc_file_lock.cpp rename to test_deprecated/testUtil/example_tc_file_lock.cpp diff --git a/test/testUtil/example_tc_gzip.cpp b/test_deprecated/testUtil/example_tc_gzip.cpp similarity index 100% rename from test/testUtil/example_tc_gzip.cpp rename to test_deprecated/testUtil/example_tc_gzip.cpp diff --git a/test/testUtil/example_tc_hashmap.cpp b/test_deprecated/testUtil/example_tc_hashmap.cpp similarity index 100% rename from test/testUtil/example_tc_hashmap.cpp rename to test_deprecated/testUtil/example_tc_hashmap.cpp diff --git a/test/testUtil/example_tc_http.cpp b/test_deprecated/testUtil/example_tc_http.cpp similarity index 100% rename from test/testUtil/example_tc_http.cpp rename to test_deprecated/testUtil/example_tc_http.cpp diff --git a/test/testUtil/example_tc_http_async.cpp b/test_deprecated/testUtil/example_tc_http_async.cpp similarity index 100% rename from test/testUtil/example_tc_http_async.cpp rename to test_deprecated/testUtil/example_tc_http_async.cpp diff --git a/test/testUtil/example_tc_lock.cpp b/test_deprecated/testUtil/example_tc_lock.cpp similarity index 100% rename from test/testUtil/example_tc_lock.cpp rename to test_deprecated/testUtil/example_tc_lock.cpp diff --git a/test/testUtil/example_tc_log.cpp b/test_deprecated/testUtil/example_tc_log.cpp similarity index 100% rename from test/testUtil/example_tc_log.cpp rename to test_deprecated/testUtil/example_tc_log.cpp diff --git a/test/testUtil/example_tc_mem_chunk.cpp b/test_deprecated/testUtil/example_tc_mem_chunk.cpp similarity index 100% rename from test/testUtil/example_tc_mem_chunk.cpp rename to test_deprecated/testUtil/example_tc_mem_chunk.cpp diff --git a/test/testUtil/example_tc_mem_queue.cpp b/test_deprecated/testUtil/example_tc_mem_queue.cpp similarity index 100% rename from test/testUtil/example_tc_mem_queue.cpp rename to test_deprecated/testUtil/example_tc_mem_queue.cpp diff --git a/test/testUtil/example_tc_mmap.cpp b/test_deprecated/testUtil/example_tc_mmap.cpp similarity index 100% rename from test/testUtil/example_tc_mmap.cpp rename to test_deprecated/testUtil/example_tc_mmap.cpp diff --git a/test/testUtil/example_tc_multi_hashmap.cpp b/test_deprecated/testUtil/example_tc_multi_hashmap.cpp similarity index 100% rename from test/testUtil/example_tc_multi_hashmap.cpp rename to test_deprecated/testUtil/example_tc_multi_hashmap.cpp diff --git a/test/testUtil/example_tc_mysql.cpp b/test_deprecated/testUtil/example_tc_mysql.cpp similarity index 100% rename from test/testUtil/example_tc_mysql.cpp rename to test_deprecated/testUtil/example_tc_mysql.cpp diff --git a/test/testUtil/example_tc_option.cpp b/test_deprecated/testUtil/example_tc_option.cpp similarity index 100% rename from test/testUtil/example_tc_option.cpp rename to test_deprecated/testUtil/example_tc_option.cpp diff --git a/test/testUtil/example_tc_pack.cpp b/test_deprecated/testUtil/example_tc_pack.cpp similarity index 100% rename from test/testUtil/example_tc_pack.cpp rename to test_deprecated/testUtil/example_tc_pack.cpp diff --git a/test/testUtil/example_tc_singleton.cpp b/test_deprecated/testUtil/example_tc_singleton.cpp similarity index 100% rename from test/testUtil/example_tc_singleton.cpp rename to test_deprecated/testUtil/example_tc_singleton.cpp diff --git a/test/testUtil/example_tc_socket.cpp b/test_deprecated/testUtil/example_tc_socket.cpp similarity index 100% rename from test/testUtil/example_tc_socket.cpp rename to test_deprecated/testUtil/example_tc_socket.cpp diff --git a/test/testUtil/example_tc_thread.cpp b/test_deprecated/testUtil/example_tc_thread.cpp similarity index 100% rename from test/testUtil/example_tc_thread.cpp rename to test_deprecated/testUtil/example_tc_thread.cpp diff --git a/test/testUtil/example_tc_thread_lock.cpp b/test_deprecated/testUtil/example_tc_thread_lock.cpp similarity index 100% rename from test/testUtil/example_tc_thread_lock.cpp rename to test_deprecated/testUtil/example_tc_thread_lock.cpp diff --git a/test/testUtil/example_tc_thread_pool.cpp b/test_deprecated/testUtil/example_tc_thread_pool.cpp similarity index 100% rename from test/testUtil/example_tc_thread_pool.cpp rename to test_deprecated/testUtil/example_tc_thread_pool.cpp diff --git a/test/testUtil/example_tc_thread_queue.cpp b/test_deprecated/testUtil/example_tc_thread_queue.cpp similarity index 100% rename from test/testUtil/example_tc_thread_queue.cpp rename to test_deprecated/testUtil/example_tc_thread_queue.cpp diff --git a/test/testUtil/log.config.conf b/test_deprecated/testUtil/log.config.conf similarity index 100% rename from test/testUtil/log.config.conf rename to test_deprecated/testUtil/log.config.conf diff --git a/test/testUtil/template.config.conf b/test_deprecated/testUtil/template.config.conf similarity index 100% rename from test/testUtil/template.config.conf rename to test_deprecated/testUtil/template.config.conf diff --git a/test/testUtil/test.html b/test_deprecated/testUtil/test.html similarity index 100% rename from test/testUtil/test.html rename to test_deprecated/testUtil/test.html diff --git a/unittest b/unittest new file mode 160000 index 0000000..e663956 --- /dev/null +++ b/unittest @@ -0,0 +1 @@ +Subproject commit e663956b02aa72f9491f759263da89d62502f7e8