-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: posix: common: separate posix semaphore tests into a standalon…
…e test posix.common contains testsuites that can be separated into smaller groups of tests. This change moves semaphore into a singular testsuite at tests/posix/semaphore app directory. Signed-off-by: Marvin Ouma <[email protected]>
- Loading branch information
Showing
5 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(posix_semaphore) | ||
|
||
FILE(GLOB app_sources src/*.c) | ||
zephyr_include_directories(${ZEPHYR_BASE}/lib/posix) | ||
|
||
target_sources(app PRIVATE ${app_sources}) | ||
|
||
target_compile_options(app PRIVATE -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2023, Meta | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config TEST_SEM_N_LOOPS | ||
int "Number of loops in semaphore test" | ||
range 16 1024 | ||
default 32 | ||
help | ||
This option is specific to semaphore.test_named_semaphore in semaphore.c | ||
|
||
source "Kconfig.zephyr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_POSIX_API=y | ||
CONFIG_ZTEST=y | ||
|
||
CONFIG_POSIX_AEP_CHOICE_PSE52=y | ||
CONFIG_POSIX_SEMAPHORES=y | ||
CONFIG_POSIX_SEM_VALUE_MAX=32767 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
common: | ||
filter: not CONFIG_NATIVE_LIBC | ||
tags: | ||
- posix | ||
- semaphore | ||
# 1 tier0 platform per supported architecture | ||
platform_key: | ||
- arch | ||
- simulation | ||
tests: | ||
portability.posix.semaphore: | ||
min_flash: 64 | ||
min_ram: 32 | ||
portability.posix.semaphore.minimal: | ||
extra_configs: | ||
- CONFIG_MINIMAL_LIBC=y | ||
portability.posix.semaphore.newlib: | ||
filter: TOOLCHAIN_HAS_NEWLIB == 1 | ||
extra_configs: | ||
- CONFIG_NEWLIB_LIBC=y | ||
portability.posix.semaphore.picolibc: | ||
tags: picolibc | ||
filter: CONFIG_PICOLIBC_SUPPORTED | ||
extra_configs: | ||
- CONFIG_PICOLIBC=y |