net: lwm2m: Add raw CBOR content writer tests
Add unit tests for raw CBOR content encoder/decoder. Signed-off-by: Markus Rekdal <markus.rekdal@nordicsemi.no>
This commit is contained in:
parent
d64dc771f3
commit
30dfcec45f
4 changed files with 1136 additions and 0 deletions
12
tests/net/lib/lwm2m/content_raw_cbor/CMakeLists.txt
Normal file
12
tests/net/lib/lwm2m/content_raw_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_raw_cbor)
|
||||||
|
|
||||||
|
target_include_directories(app PRIVATE
|
||||||
|
${ZEPHYR_BASE}/subsys/net/lib/lwm2m
|
||||||
|
)
|
||||||
|
FILE(GLOB app_sources src/*.c)
|
||||||
|
target_sources(app PRIVATE ${app_sources})
|
11
tests/net/lib/lwm2m/content_raw_cbor/prj.conf
Normal file
11
tests/net/lib/lwm2m/content_raw_cbor/prj.conf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
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
|
1107
tests/net/lib/lwm2m/content_raw_cbor/src/main.c
Normal file
1107
tests/net/lib/lwm2m/content_raw_cbor/src/main.c
Normal file
File diff suppressed because it is too large
Load diff
6
tests/net/lib/lwm2m/content_raw_cbor/testcase.yaml
Normal file
6
tests/net/lib/lwm2m/content_raw_cbor/testcase.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
common:
|
||||||
|
depends_on: netif
|
||||||
|
tests:
|
||||||
|
net.lwm2m.content_raw_cbor:
|
||||||
|
platform_allow: native_posix
|
||||||
|
tags: lwm2m net
|
Loading…
Add table
Add a link
Reference in a new issue