Skip to content

Commit

Permalink
tests: Switch from NEWLIB_LIBC to REQUIRES_FULL_LIBC
Browse files Browse the repository at this point in the history
Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF and
CONFIG_REQUIRES_MALLOC where needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Sep 30, 2023
1 parent 3bb4c21 commit 59d04c9
Show file tree
Hide file tree
Showing 62 changed files with 165 additions and 169 deletions.
2 changes: 1 addition & 1 deletion tests/benchmarks/cmsis_dsp/basicmath/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
5 changes: 2 additions & 3 deletions tests/benchmarks/cmsis_dsp/basicmath/testcase.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
tests:
benchmark.cmsis_dsp.basicmath:
filter: (CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1
filter: (CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -13,7 +12,7 @@ tests:
min_ram: 64
benchmark.cmsis_dsp.basicmath.fpu:
filter: (CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1
and CONFIG_FULL_LIBC_SUPPORTED
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
4 changes: 2 additions & 2 deletions tests/bluetooth/shell/boards/native_posix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ CONFIG_LIBLC3=y
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
# LC3 lib requires floating point support in the c-lib NEWLIB is one way of getting that.
CONFIG_NEWLIB_LIBC=y
# LC3 lib requires floating point support in the c-lib.
CONFIG_REQUIRES_FULL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ CONFIG_LIBLC3=y
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
# LC3 lib requires floating point support in the c-lib NEWLIB is one way of getting that.
CONFIG_NEWLIB_LIBC=y
# LC3 lib requires floating point support in the c-lib.
CONFIG_REQUIRES_FULL_LIBC=y
4 changes: 2 additions & 2 deletions tests/bluetooth/shell/boards/nrf5340dk_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ CONFIG_LIBLC3=y
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
# LC3 lib requires floating point support in the c-lib NEWLIB is one way of getting that.
CONFIG_NEWLIB_LIBC=y
# LC3 lib requires floating point support in the c-lib.
CONFIG_REQUIRES_FULL_LIBC=y
2 changes: 1 addition & 1 deletion tests/bsim/net/sockets/echo_test/overlay-ot.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file content is just a copy of the echo client overlay-ot.conf

CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y

# Disable TCP and IPv4 (TCP disabled to avoid heavy traffic)
CONFIG_NET_TCP=n
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/bayes/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
6 changes: 3 additions & 3 deletions tests/lib/cmsis_dsp/bayes/testcase.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tests:
libraries.cmsis_dsp.bayes:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -12,7 +12,7 @@ tests:
min_ram: 32
libraries.cmsis_dsp.bayes.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/complexmath/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
6 changes: 3 additions & 3 deletions tests/lib/cmsis_dsp/complexmath/testcase.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tests:
libraries.cmsis_dsp.complexmath:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -12,7 +12,7 @@ tests:
min_ram: 144
libraries.cmsis_dsp.complexmath.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/distance/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
6 changes: 3 additions & 3 deletions tests/lib/cmsis_dsp/distance/testcase.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tests:
libraries.cmsis_dsp.distance:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -12,7 +12,7 @@ tests:
min_ram: 32
libraries.cmsis_dsp.distance.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/fastmath/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
6 changes: 3 additions & 3 deletions tests/lib/cmsis_dsp/fastmath/testcase.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tests:
libraries.cmsis_dsp.fastmath:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -12,7 +12,7 @@ tests:
min_ram: 64
libraries.cmsis_dsp.fastmath.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/filtering/prj.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y

# Test Options
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/filtering/prj_base.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
28 changes: 14 additions & 14 deletions tests/lib/cmsis_dsp/filtering/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ common:

tests:
libraries.cmsis_dsp.filtering:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
tags: cmsis_dsp
skip: true
libraries.cmsis_dsp.filtering.biquad:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -23,7 +23,7 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_BIQUAD=y
libraries.cmsis_dsp.filtering.biquad.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand All @@ -37,8 +37,8 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_BIQUAD=y
- CONFIG_FPU=y
libraries.cmsis_dsp.filtering.decim:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -52,7 +52,7 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_DECIM=y
libraries.cmsis_dsp.filtering.decim.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand All @@ -66,8 +66,8 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_DECIM=y
- CONFIG_FPU=y
libraries.cmsis_dsp.filtering.fir:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -81,7 +81,7 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_FIR=y
libraries.cmsis_dsp.filtering.fir.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand All @@ -95,8 +95,8 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_FIR=y
- CONFIG_FPU=y
libraries.cmsis_dsp.filtering.misc:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -110,7 +110,7 @@ tests:
- CONFIG_CMSIS_DSP_TEST_FILTERING_MISC=y
libraries.cmsis_dsp.filtering.misc.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/interpolation/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
6 changes: 3 additions & 3 deletions tests/lib/cmsis_dsp/interpolation/testcase.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tests:
libraries.cmsis_dsp.interpolation:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and TOOLCHAIN_HAS_NEWLIB
== 1) or CONFIG_ARCH_POSIX
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_FULL_LIBC_SUPPORTED
) or CONFIG_ARCH_POSIX
integration_platforms:
- frdm_k64f
- sam_e70_xplained
Expand All @@ -12,7 +12,7 @@ tests:
min_ram: 64
libraries.cmsis_dsp.interpolation.fpu:
filter: ((CONFIG_CPU_AARCH32_CORTEX_R or CONFIG_CPU_CORTEX_M) and CONFIG_CPU_HAS_FPU
and TOOLCHAIN_HAS_NEWLIB == 1) or CONFIG_ARCH_POSIX
and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX
integration_platforms:
- mps2_an521_remote
- mps3_an547
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/matrix/prj.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y

# Test Options
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cmsis_dsp/matrix/prj_base.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_CMSIS_DSP=y
Loading

0 comments on commit 59d04c9

Please sign in to comment.