From cc8c11c658028dcee22f658f879fb32680b7a29d Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 24 Jan 2025 23:32:21 -0700 Subject: [PATCH] samples: Properly filter samples by supported Rust targets Without explicitly declaring the need for Rust support, twister tries to build these samples on targest that don't yet support Rust. Include the filter, as well as an explicit platform allow of the supported targets. Signed-off-by: David Brown --- samples/blinky/sample.yaml | 10 ++++++++++ samples/philosophers/sample.yaml | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/samples/blinky/sample.yaml b/samples/blinky/sample.yaml index 2b37187d..71590844 100644 --- a/samples/blinky/sample.yaml +++ b/samples/blinky/sample.yaml @@ -1,6 +1,16 @@ # See doc/develop/test/twister.rst for what is here. sample: name: Blinky Sample +common: + filter: CONFIG_RUST_SUPPORTED + platform_allow: + - qemu_cortex_m0 + - qemu_cortex_m3 + - qemu_riscv32 + - qemu_riscv32/qemu_virt_riscv32/smp + - qemu_riscv64 + - qemu_riscv64/qemu_virt_riscv64/smp + - nrf52840dk/nrf52840 tests: sample.basic.blinky: tags: diff --git a/samples/philosophers/sample.yaml b/samples/philosophers/sample.yaml index 8af73988..6aeb60f9 100644 --- a/samples/philosophers/sample.yaml +++ b/samples/philosophers/sample.yaml @@ -11,6 +11,14 @@ common: - "c:\\[\\d{2,}, \\d{2,}, \\d{2,}, \\d{2,}, \\d{2,}, \\d{2,}\\]" tags: rust filter: CONFIG_RUST_SUPPORTED + platform_allow: + - qemu_cortex_m0 + - qemu_cortex_m3 + - qemu_riscv32 + - qemu_riscv32/qemu_virt_riscv32/smp + - qemu_riscv64 + - qemu_riscv64/qemu_virt_riscv64/smp + - nrf52840dk/nrf52840 tests: sample.rust.philosopher.semaphore: tags: introduction