From 35e017a9ee53035167aabb85e2c8c7e1ff2c9e36 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 6 Jan 2023 13:36:21 -0800 Subject: [PATCH] subsys/cpp: Also run C++ tests with picolibc when possible When the toolchain has picolibc support, run samples/subsys/cpp/cpp_synchronization and tests/subsys/cpp/libcxx tests using it. Signed-off-by: Keith Packard --- samples/cpp/cpp_synchronization/sample.yaml | 15 +++++++++++++++ tests/lib/cpp/libcxx/testcase.yaml | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/samples/cpp/cpp_synchronization/sample.yaml b/samples/cpp/cpp_synchronization/sample.yaml index e3e9669a1ad..2b9311e2067 100644 --- a/samples/cpp/cpp_synchronization/sample.yaml +++ b/samples/cpp/cpp_synchronization/sample.yaml @@ -13,3 +13,18 @@ tests: - "Create semaphore (.*)" - "main: Hello World!" - "coop_thread_entry: Hello World!" + sample.cpp.synchronization.picolibc: + filter: CONFIG_PICOLIBC_SUPPORTED + extra_configs: + - CONFIG_PICOLIBC=y + tags: cpp + toolchain_exclude: issm xcc + integration_platforms: + - qemu_x86 + harness: console + harness_config: + type: multi_line + regex: + - "Create semaphore (.*)" + - "main: Hello World!" + - "coop_thread_entry: Hello World!" diff --git a/tests/lib/cpp/libcxx/testcase.yaml b/tests/lib/cpp/libcxx/testcase.yaml index 3a1371345b5..a57941b1827 100644 --- a/tests/lib/cpp/libcxx/testcase.yaml +++ b/tests/lib/cpp/libcxx/testcase.yaml @@ -23,6 +23,17 @@ tests: - CONFIG_GLIBCXX_LIBCPP=y integration_platforms: - mps2_an385 + cpp.libcxx.glibcxx.picolibc: + filter: TOOLCHAIN_HAS_PICOLIBC == 1 + toolchain_exclude: xcc + tags: cpp + timeout: 60 + extra_configs: + - CONFIG_PICOLIBC=y + - CONFIG_GLIBCXX_LIBCPP=y + - CONFIG_CPP_EXCEPTIONS=y + integration_platforms: + - mps2_an385 cpp.libcxx.arcmwdtlib: toolchain_allow: arcmwdt min_flash: 54