Commit 9211abcd authored by Marvin Ouma's avatar Marvin Ouma Committed by Benjamin Cabé
Browse files

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: default avatarMarvin Ouma <pancakesdeath@protonmail.com>
parent 91e006cb
Loading
Loading
Loading
Loading
+9 −0
Changes for tests/posix/xsi_system_logging/CMakeLists.txt: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
# 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)
+5 −0
Changes for tests/posix/xsi_system_logging/prj.conf: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
CONFIG_POSIX_API=y
CONFIG_ZTEST=y

CONFIG_POSIX_AEP_CHOICE_BASE=y
CONFIG_XSI_SYSTEM_LOGGING=y
+2 −2
Changes for tests/posix/xsi_system_logging/src/main.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
/* 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);
+24 −0
Changes for tests/posix/xsi_system_logging/testcase.yaml: 24 added lines, 0 removed lines.
Original line number Diff line number Diff line
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