net: lwm2m: Add SenML CBOR content writer tests
This will add unit tests for the SenML CBOR content encoder/decoder Signed-off-by: Markus Rekdal <markus.rekdal@nordicsemi.no>
This commit is contained in:
parent
191f93c325
commit
071a017b18
4 changed files with 1605 additions and 0 deletions
12
tests/net/lib/lwm2m/content_senml_cbor/CMakeLists.txt
Normal file
12
tests/net/lib/lwm2m/content_senml_cbor/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(lwm2m_content_senml_cbor)
|
||||
|
||||
target_include_directories(app PRIVATE
|
||||
${ZEPHYR_BASE}/subsys/net/lib/lwm2m
|
||||
)
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
13
tests/net/lib/lwm2m/content_senml_cbor/prj.conf
Normal file
13
tests/net/lib/lwm2m/content_senml_cbor/prj.conf
Normal file
|
@ -0,0 +1,13 @@
|
|||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_ZTEST=y
|
||||
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
|
||||
CONFIG_LWM2M=y
|
||||
CONFIG_LWM2M_VERSION_1_1=y
|
||||
CONFIG_LWM2M_RW_CBOR_SUPPORT=y
|
||||
CONFIG_LWM2M_RW_SENML_CBOR_SUPPORT=y
|
||||
CONFIG_ZCBOR_CANONICAL=y
|
1574
tests/net/lib/lwm2m/content_senml_cbor/src/main.c
Normal file
1574
tests/net/lib/lwm2m/content_senml_cbor/src/main.c
Normal file
File diff suppressed because it is too large
Load diff
6
tests/net/lib/lwm2m/content_senml_cbor/testcase.yaml
Normal file
6
tests/net/lib/lwm2m/content_senml_cbor/testcase.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
common:
|
||||
depends_on: netif
|
||||
tests:
|
||||
net.lwm2m.content_senml_cbor:
|
||||
platform_allow: native_posix
|
||||
tags: lwm2m net
|
Loading…
Add table
Add a link
Reference in a new issue