Skip to content

Commit 00d214c

Browse files
rluboskartben
authored andcommitted
tests: net: http_client: Add new testsuite for HTTP client
And some basic tests. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
1 parent 3572c9f commit 00d214c

File tree

5 files changed

+461
-0
lines changed

5 files changed

+461
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(http_client)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
9+
10+
zephyr_linker_sources(SECTIONS sections-rom.ld)
11+
zephyr_iterable_section(NAME http_resource_desc_test_http_service KVMA
12+
RAM_REGION GROUP RODATA_REGION SUBALIGN $
13+
{CONFIG_LINKER_ITERABLE_SUBALIGN})

tests/net/lib/http_client/prj.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CONFIG_NETWORKING=y
2+
CONFIG_NET_DRIVERS=y
3+
CONFIG_NET_LOOPBACK=y
4+
CONFIG_NET_TEST=y
5+
CONFIG_EVENTFD=y
6+
CONFIG_NET_SOCKETS=y
7+
CONFIG_NET_TCP=y
8+
CONFIG_NET_TCP_TIME_WAIT_DELAY=0
9+
CONFIG_NET_BUF_RX_COUNT=32
10+
CONFIG_NET_BUF_TX_COUNT=32
11+
CONFIG_NET_PKT_RX_COUNT=8
12+
CONFIG_NET_PKT_TX_COUNT=8
13+
CONFIG_ZTEST=y
14+
CONFIG_ENTROPY_GENERATOR=y
15+
CONFIG_TEST_RANDOM_GENERATOR=y
16+
17+
CONFIG_HTTP_CLIENT=y
18+
CONFIG_HTTP_SERVER=y
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include <zephyr/linker/iterable_sections.h>
2+
3+
ITERABLE_SECTION_ROM(http_resource_desc_test_http_service, 4)

0 commit comments

Comments
 (0)