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 <pancakesdeath@protonmail.com>
This commit is contained in:
Marvin Ouma 2024-11-05 22:10:47 +03:00 committed by Benjamin Cabé
commit 9211abcde6
4 changed files with 41 additions and 3 deletions

View file

@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(xsi_system_logging)
target_sources(app PRIVATE src/main.c)
target_compile_options(app PRIVATE -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L)

View file

@ -0,0 +1,5 @@
CONFIG_POSIX_API=y
CONFIG_ZTEST=y
CONFIG_POSIX_AEP_CHOICE_BASE=y
CONFIG_XSI_SYSTEM_LOGGING=y

View file

@ -9,11 +9,11 @@
#include <zephyr/posix/unistd.h>
#include <zephyr/ztest.h>
#define N_PRIOS 8
#define N_PRIOS 8
/* avoid clashing with Zephyr's LOG_ERR() */
#define _LOG_ERR 3
ZTEST(syslog, test_syslog)
ZTEST(xsi_system_logging, test_syslog)
{
int prios[N_PRIOS] = {
LOG_EMERG, LOG_ALERT, LOG_CRIT, _LOG_ERR,
@ -33,4 +33,4 @@ ZTEST(syslog, test_syslog)
usleep(100000);
}
ZTEST_SUITE(syslog, NULL, NULL, NULL, NULL, NULL);
ZTEST_SUITE(xsi_system_logging, NULL, NULL, NULL, NULL, NULL);

View file

@ -0,0 +1,24 @@
common:
filter: not CONFIG_NATIVE_LIBC
tags:
- xsi.system.logging
# 1 tier0 platform per supported architecture
platform_key:
- arch
- simulation
min_flash: 64
min_ram: 32
tests:
portability.xsi.system.logging: {}
portability.xsi.system.logging.minimal:
extra_configs:
- CONFIG_MINIMAL_LIBC=y
portability.xsi.system.logging.newlib:
filter: TOOLCHAIN_HAS_NEWLIB == 1
extra_configs:
- CONFIG_NEWLIB_LIBC=y
portability.xsi.system.logging.picolibc:
tags: picolibc
filter: CONFIG_PICOLIBC_SUPPORTED
extra_configs:
- CONFIG_PICOLIBC=y