cmake: Bootstrap server as individual project

The bootstrap server project now uses Wakaama as a direct dependent
project. The CI and integration tests were adjusted for the new project.
This commit is contained in:
Lukas Woodtli 2024-09-02 09:23:03 +02:00 committed by Lukas Woodtli
parent 7e1d606d9c
commit d638712749
5 changed files with 11 additions and 12 deletions

View File

@ -41,7 +41,7 @@ jobs:
- name: Build examples for integration tests
run: |
for example in "server"
for example in "server" "bootstrap_server"
do
echo "Building example ${example}"
tools/ci/run_ci.sh \

View File

@ -285,7 +285,7 @@ Options:
```
### Bootstrap Server example
* ``cmake -S examples/bootstrap_server -B build-bootstrap -DWAKAAMA_MODE_BOOTSTRAP_SERVER=ON``
* ``cmake -S examples/bootstrap_server -B build-bootstrap``
* ``cmake --build build-bootstrap``
* ``./build-bootstrap/bootstrap_server [Options]``

View File

@ -3,6 +3,5 @@ cmake_minimum_required(VERSION 3.21)
# Our examples are designed for POSIX systems
add_compile_definitions(_POSIX_C_SOURCE=200809)
add_subdirectory(bootstrap_server)
add_subdirectory(client)
add_subdirectory(lightclient)

View File

@ -2,11 +2,12 @@ cmake_minimum_required(VERSION 3.21)
project(bootstrap_server C)
include(../../wakaama.cmake)
set(WAKAAMA_MODE_BOOTSTRAP_SERVER ON)
set(WAKAAMA_CLI ON)
set(WAKAAMA_TRANSPORT POSIX_UDP)
set(WAKAAMA_PLATFORM POSIX)
add_subdirectory(../../ wakaama_lib)
if(WAKAAMA_ENABLE_EXAMPLES AND WAKAAMA_MODE_BOOTSTRAP_SERVER)
add_executable(bootstrap_server bootstrap_info.c bootstrap_server.c bootstrap_info.h bootstrap_server.ini)
target_compile_definitions(bootstrap_server PRIVATE LWM2M_BOOTSTRAP_SERVER_MODE)
target_sources_wakaama(bootstrap_server)
target_sources_shared(bootstrap_server)
endif()
add_executable(bootstrap_server)
target_sources(bootstrap_server PRIVATE bootstrap_info.c bootstrap_server.c bootstrap_info.h bootstrap_server.ini)
target_link_libraries(bootstrap_server PRIVATE wakaama_static)

View File

@ -104,8 +104,7 @@ class Lwm2mBootstrapServer(HelperBase):
def __init__(self, arguments="", timeout=3, encoding="utf8"):
self.pexpectobj = pexpect.spawn(REPO_BASE_PATH +
"/build-presets/bootstrap_server/examples/"
"bootstrap_server/bootstrap_server "
"/build-wakaama-bootstrap_server/bootstrap_server "
+ arguments,
encoding=encoding,
timeout=timeout)