From b159eb395330f3436324889dbf86b8b760628680 Mon Sep 17 00:00:00 2001 From: armatusmiles <akurotych@gmail.com> Date: Sun, 24 Feb 2019 00:01:16 +0700 Subject: [PATCH] [+] test module --- .gitignore | 2 ++ .gitmodules | 21 +++++++++++++++++++++ CMakeLists.txt | 14 ++++++++++++++ libdap | 1 + libdap-server | 1 + libdap-server-core | 1 + libdap-server-udp | 1 + libdap-stream-ch | 1 + test/CMakeLists.txt | 18 ++++++++++++++++++ test/libdap-test | 1 + test/main.c | 7 +++++++ 11 files changed, 68 insertions(+) create mode 100644 .gitmodules create mode 160000 libdap create mode 160000 libdap-server create mode 160000 libdap-server-core create mode 160000 libdap-server-udp create mode 160000 libdap-stream-ch create mode 100644 test/CMakeLists.txt create mode 160000 test/libdap-test create mode 100644 test/main.c diff --git a/.gitignore b/.gitignore index c6127b3..7842fb2 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,5 @@ modules.order Module.symvers Mkfile.old dkms.conf + +*.txt.user diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2f6812d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,21 @@ +[submodule "libdap"] + path = libdap + url = https://github.com/kelvinblockchain/libdap +[submodule "libdap-server-core"] + path = libdap-server-core + url = https://github.com/kelvinblockchain/libdap-server-core +[submodule "libdap-server"] + path = libdap-server + url = https://github.com/kelvinblockchain/libdap-server +[submodule "libdap-server-udp"] + path = libdap-server-udp + url = https://github.com/kelvinblockchain/libdap-server-udp +[submodule "test/libdap-test"] + path = test/libdap-test + url = https://github.com/kelvinblockchain/libdap-test +[submodule "test/libdap-stream-ch"] + path = libdap-stream-ch + url = https://github.com/kelvinblockchain/libdap-stream-ch +[submodule "libdap-stream-ch"] + path = libdap-stream-ch + url = https://github.com/kelvinblockchain/libdap-stream-ch diff --git a/CMakeLists.txt b/CMakeLists.txt index 67e5e06..9be093c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,19 @@ project(libdap-stream C) cmake_minimum_required(VERSION 2.8) +if(NOT (${SUBMODULES_NO_BUILD} MATCHES ON)) + set(SUBMODULES_NO_BUILD ON) + add_subdirectory(libdap) + add_subdirectory(libdap-server) + add_subdirectory(libdap-server-core) + add_subdirectory(libdap-server-udp) + add_subdirectory(libdap-stream-ch) +endif() + +#if(BUILD_DAP_STREAM_TESTS) + enable_testing() + add_subdirectory(test) +#endif() + add_subdirectory(session) add_subdirectory(stream) diff --git a/libdap b/libdap new file mode 160000 index 0000000..842029d --- /dev/null +++ b/libdap @@ -0,0 +1 @@ +Subproject commit 842029d3892f8794ff7f1a85af6d024ce62e1796 diff --git a/libdap-server b/libdap-server new file mode 160000 index 0000000..2d675d9 --- /dev/null +++ b/libdap-server @@ -0,0 +1 @@ +Subproject commit 2d675d9e6d94ae8961f97af0ee7e16c2816a24af diff --git a/libdap-server-core b/libdap-server-core new file mode 160000 index 0000000..a655fc5 --- /dev/null +++ b/libdap-server-core @@ -0,0 +1 @@ +Subproject commit a655fc5695e7da0b58c7cb5188d287dcf83f6939 diff --git a/libdap-server-udp b/libdap-server-udp new file mode 160000 index 0000000..2564d01 --- /dev/null +++ b/libdap-server-udp @@ -0,0 +1 @@ +Subproject commit 2564d01f7663a9b3fd0c30d9f2aefe0580b327cd diff --git a/libdap-stream-ch b/libdap-stream-ch new file mode 160000 index 0000000..e12cd24 --- /dev/null +++ b/libdap-stream-ch @@ -0,0 +1 @@ +Subproject commit e12cd24dfca8b778cf63d1c957d04f7d2471f75c diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..1da3b2d --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,18 @@ +if(TARGET libdap_stream_test) + return() # The project has already been built. +endif() +project(libdap_stream_test) + +add_subdirectory(libdap-test) + +file(GLOB SOURCES *.c) +file(GLOB HEADERS *.h) + +add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS}) + +target_link_libraries(${PROJECT_NAME} dap_test dap_core) + +add_test( + NAME libdap_stream_test + COMMAND libdap_stream_test +) diff --git a/test/libdap-test b/test/libdap-test new file mode 160000 index 0000000..d225778 --- /dev/null +++ b/test/libdap-test @@ -0,0 +1 @@ +Subproject commit d2257789e0c796a5a3b637e14dcbaf8a8c7880cc diff --git a/test/main.c b/test/main.c new file mode 100644 index 0000000..d015aec --- /dev/null +++ b/test/main.c @@ -0,0 +1,7 @@ +#include "dap_common.h" + +int main(void) { + // switch off debug info from library + set_log_level(L_CRITICAL); + return 0; +} -- GitLab