Skip to content

Commit

Permalink
cmake: Bootstrap server as individual project
Browse files Browse the repository at this point in the history
The bootstrap server project now uses Wakaama as a direct dependent
project. The CI and integration tests were adjusted for the new project.
  • Loading branch information
LukasWoodtli committed Sep 10, 2024
1 parent 052152b commit fdc2683
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]``

Expand Down
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
15 changes: 8 additions & 7 deletions examples/bootstrap_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 1 addition & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fdc2683

Please sign in to comment.