Skip to content
Snippets Groups Projects
Commit 4a401fc2 authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

[*] Splitted *.c and *.h by src/ and include/

[*] Fixed unit tests
parent f201377f
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
[submodule "libdap-crypto"] [submodule "libdap-crypto"]
path = libdap-crypto path = libdap-crypto
url = https://github.com/kelvinblockchain/libdap-crypto url = https://github.com/cellframe/libdap-crypto
branch = master branch = master
[submodule "test/libdap-test"] [submodule "test/libdap-test"]
......
...@@ -11,7 +11,7 @@ before_install: ...@@ -11,7 +11,7 @@ before_install:
script: script:
- mkdir build - mkdir build
- cd build - cd build
- cmake . - cmake -DBUILD_DAP_SERVER_CORE_TESTS=ON ../
- make - make
- ctest --verbose - ctest --verbose
......
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
if(TARGET dap_core_server) if(TARGET dap_server_core)
return() # The project has already been built. return() # The project has already been built.
endif() endif()
project (dap_core_server C) project (dap_server_core C)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
add_definitions ("-D_GNU_SOURCE") add_definitions ("-D_GNU_SOURCE")
if(NOT (${SUBMODULES_NO_BUILD} MATCHES ON)) if(NOT (${SUBMODULES_NO_BUILD} MATCHES ON))
set(SUBMODULES_NO_BUILD ON)
if ( NOT ( TARGET dap_core ) ) if ( NOT ( TARGET dap_core ) )
add_subdirectory(libdap) add_subdirectory(libdap)
endif() endif()
if ( NOT ( TARGET dap_crypto ) ) if ( NOT ( TARGET dap_crypto ) )
add_subdirectory(libdap-crypto) add_subdirectory(libdap-crypto)
endif() endif()
endif()
if (BUILD_DAP_SERVER_CORE_TESTS)
enable_testing() enable_testing()
add_subdirectory(test) add_subdirectory(test)
endif() endif()
file(GLOB CORE_SERVER_SOURCES *.c) file(GLOB CORE_SERVER_SOURCES src/*.c)
file(GLOB CORE_SERVER_HEADERS *.h) file(GLOB CORE_SERVER_HEADERS include/*.h src/*.h)
add_library(${PROJECT_NAME} STATIC ${CORE_SERVER_SOURCES} ${CORE_SERVER_HEADERS}) add_library(${PROJECT_NAME} STATIC ${CORE_SERVER_SOURCES} ${CORE_SERVER_HEADERS})
target_link_libraries(${PROJECT_NAME} pthread ev memcached dap_core dap_crypto) target_link_libraries(${PROJECT_NAME} pthread ev memcached dap_core dap_crypto)
target_include_directories(${PROJECT_NAME} INTERFACE .) target_include_directories(${PROJECT_NAME} INTERFACE include/ )
File moved
File moved
File moved
File moved
File moved
File moved
Subproject commit ff63d762657f9687173db825705b8bf4b958abee
File moved
File moved
File moved
File moved
File moved
File moved
if(TARGET core_server_test) if(TARGET server_core_test)
return() # The project has already been built. return() # The project has already been built.
endif() endif()
project(core_server_test) project(server_core_test)
add_subdirectory(libdap-test) add_subdirectory(libdap-test)
...@@ -10,7 +10,7 @@ file(GLOB HEADERS *.h) ...@@ -10,7 +10,7 @@ file(GLOB HEADERS *.h)
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS}) add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
target_link_libraries(${PROJECT_NAME} dap_test dap_core_server ev) target_link_libraries(${PROJECT_NAME} dap_test dap_core dap_crypto dap_server_core ev)
add_test( add_test(
NAME core_server_test NAME core_server_test
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
int main(void) { int main(void) {
// switch off debug info from library // switch off debug info from library
// set_log_level(L_CRITICAL); dap_log_level_set(L_CRITICAL);
// dap_traffic_track_tests_run(); dap_traffic_track_tests_run();
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment