Skip to content

Commit 9211abc

Browse files
Pancakemkartben
authored andcommitted
tests: posix: common: separate posix xsi system logging to standalone test
posix.common contains testsuites that can be separated into smaller groups of tests. This change moves syslog into a singular testsuite at tests/posix/xsi_system_logging app directory. Signed-off-by: Marvin Ouma <[email protected]>
1 parent 91e006c commit 9211abc

File tree

4 files changed

+41
-3
lines changed

4 files changed

+41
-3
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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(xsi_system_logging)
6+
7+
target_sources(app PRIVATE src/main.c)
8+
9+
target_compile_options(app PRIVATE -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_POSIX_API=y
2+
CONFIG_ZTEST=y
3+
4+
CONFIG_POSIX_AEP_CHOICE_BASE=y
5+
CONFIG_XSI_SYSTEM_LOGGING=y

tests/posix/common/src/syslog.c renamed to tests/posix/xsi_system_logging/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#include <zephyr/posix/unistd.h>
1010
#include <zephyr/ztest.h>
1111

12-
#define N_PRIOS 8
12+
#define N_PRIOS 8
1313
/* avoid clashing with Zephyr's LOG_ERR() */
1414
#define _LOG_ERR 3
1515

16-
ZTEST(syslog, test_syslog)
16+
ZTEST(xsi_system_logging, test_syslog)
1717
{
1818
int prios[N_PRIOS] = {
1919
LOG_EMERG, LOG_ALERT, LOG_CRIT, _LOG_ERR,
@@ -33,4 +33,4 @@ ZTEST(syslog, test_syslog)
3333
usleep(100000);
3434
}
3535

36-
ZTEST_SUITE(syslog, NULL, NULL, NULL, NULL, NULL);
36+
ZTEST_SUITE(xsi_system_logging, NULL, NULL, NULL, NULL, NULL);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
common:
2+
filter: not CONFIG_NATIVE_LIBC
3+
tags:
4+
- xsi.system.logging
5+
# 1 tier0 platform per supported architecture
6+
platform_key:
7+
- arch
8+
- simulation
9+
min_flash: 64
10+
min_ram: 32
11+
tests:
12+
portability.xsi.system.logging: {}
13+
portability.xsi.system.logging.minimal:
14+
extra_configs:
15+
- CONFIG_MINIMAL_LIBC=y
16+
portability.xsi.system.logging.newlib:
17+
filter: TOOLCHAIN_HAS_NEWLIB == 1
18+
extra_configs:
19+
- CONFIG_NEWLIB_LIBC=y
20+
portability.xsi.system.logging.picolibc:
21+
tags: picolibc
22+
filter: CONFIG_PICOLIBC_SUPPORTED
23+
extra_configs:
24+
- CONFIG_PICOLIBC=y

0 commit comments

Comments
 (0)