Skip to content
Snippets Groups Projects
Commit 0f42979a authored by armatusmiles's avatar armatusmiles
Browse files

[+] test module and .travis.yml

parent 2bf08558
No related branches found
No related tags found
No related merge requests found
......@@ -13,3 +13,6 @@
[submodule "libdap-stream-ch"]
path = libdap-stream-ch
url = https://github.com/kelvinblockchain/libdap-stream-ch
[submodule "test/libdap-test"]
path = test/libdap-test
url = https://github.com/kelvinblockchain/libdap-test
sudo: required
language: cpp
compiler: gcc
dist: trusty
notifications:
email: false
before_install:
- git submodule init
- git submodule update --recursive
script:
- export CC=gcc-5
- mkdir build
- cd build
- cmake -DBUILD_LIB_DAP_CLIENT_TESTS=ON ../
- make
- ctest --verbose
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- libev-dev
- libmagic-dev
......@@ -12,6 +12,12 @@ add_subdirectory(libdap-server)
add_subdirectory(libdap-stream)
add_subdirectory(libdap-stream-ch)
if(BUILD_LIB_DAP_CLIENT_TESTS)
enable_testing()
add_subdirectory(test)
endif()
file(GLOB DAP_CLIENT_SRCS *.c)
file(GLOB DAP_CLIENT_HEADERS *.h)
......@@ -19,7 +25,5 @@ add_library(${PROJECT_NAME} STATIC ${DAP_CLIENT_SRCS} ${DAP_CLIENT_HEADERS})
target_link_libraries(${PROJECT_NAME} dap_crypto dap_core dap_http_server dap_session dap_stream)
#dap_udp_server dap_stream dap_session
target_include_directories(${PROJECT_NAME} INTERFACE .)
if(TARGET libdap_client_test)
return() # The project has already been built.
endif()
project(libdap_client_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_client_test
COMMAND libdap_client_test
)
Subproject commit d40ba8973440b7c712d5a64df03a312adcf7c2fd
#include "dap_common.h"
int main(void) {
// switch off debug info from library
set_log_level(L_CRITICAL);
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