tests: posix: common: separate posix barriers to standalone test
posix.common contains testsuites that can be separated into smaller groups of tests. This change moves barrier into a singular testsuite at tests/posix/barriers app directory. Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
This commit is contained in:
parent
a199f7f9d3
commit
05196e38a9
4 changed files with 41 additions and 2 deletions
9
tests/posix/barriers/CMakeLists.txt
Normal file
9
tests/posix/barriers/CMakeLists.txt
Normal 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(posix_barriers)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
target_compile_options(app PRIVATE -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L)
|
5
tests/posix/barriers/prj.conf
Normal file
5
tests/posix/barriers/prj.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
CONFIG_POSIX_API=y
|
||||
CONFIG_ZTEST=y
|
||||
|
||||
CONFIG_POSIX_AEP_CHOICE_BASE=y
|
||||
CONFIG_POSIX_BARRIERS=y
|
|
@ -10,7 +10,7 @@
|
|||
#include <zephyr/sys/util.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
ZTEST(barrier, test_barrier)
|
||||
ZTEST(posix_barriers, test_barrier)
|
||||
{
|
||||
int ret, pshared;
|
||||
pthread_barrierattr_t attr;
|
||||
|
@ -38,4 +38,4 @@ ZTEST(barrier, test_barrier)
|
|||
zassert_equal(ret, 0, "pthread_barrierattr_destroy failed");
|
||||
}
|
||||
|
||||
ZTEST_SUITE(barrier, NULL, NULL, NULL, NULL, NULL);
|
||||
ZTEST_SUITE(posix_barriers, NULL, NULL, NULL, NULL, NULL);
|
25
tests/posix/barriers/testcase.yaml
Normal file
25
tests/posix/barriers/testcase.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
common:
|
||||
filter: not CONFIG_NATIVE_LIBC
|
||||
tags:
|
||||
- posix
|
||||
- barriers
|
||||
# 1 tier0 platform per supported architecture
|
||||
platform_key:
|
||||
- arch
|
||||
- simulation
|
||||
min_flash: 64
|
||||
min_ram: 32
|
||||
tests:
|
||||
portability.posix.barriers: {}
|
||||
portability.posix.barriers.minimal:
|
||||
extra_configs:
|
||||
- CONFIG_MINIMAL_LIBC=y
|
||||
portability.posix.barriers.newlib:
|
||||
filter: TOOLCHAIN_HAS_NEWLIB == 1
|
||||
extra_configs:
|
||||
- CONFIG_NEWLIB_LIBC=y
|
||||
portability.posix.barriers.picolibc:
|
||||
tags: picolibc
|
||||
filter: CONFIG_PICOLIBC_SUPPORTED
|
||||
extra_configs:
|
||||
- CONFIG_PICOLIBC=y
|
Loading…
Add table
Add a link
Reference in a new issue