samples: add module requirement into samples

Do not build those samples if the needed modules are not available in
the workspace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-04-18 22:31:18 -04:00
commit 2d97bdd85d
16 changed files with 48 additions and 18 deletions

View file

@ -2,6 +2,8 @@ sample:
name: CANopenNode sample name: CANopenNode sample
common: common:
tags: can canopen tags: can canopen
modules:
- canopennode
depends_on: can depends_on: can
filter: dt_chosen_enabled("zephyr,canbus") filter: dt_chosen_enabled("zephyr,canbus")
harness: console harness: console

View file

@ -5,6 +5,8 @@ sample:
tests: tests:
sample.modules.chre: sample.modules.chre:
tags: introduction tags: introduction
modules:
- chre
harness: console harness: console
harness_config: harness_config:
type: multi_line type: multi_line

View file

@ -3,6 +3,8 @@ sample:
buffer buffer
name: Simple nanopb name: Simple nanopb
common: common:
modules:
- nanopb
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line

View file

@ -3,6 +3,8 @@ sample:
name: hello world tensorflow name: hello world tensorflow
common: common:
tags: tensorflow tags: tensorflow
modules:
- tflite-micro
harness: console harness: console
harness_config: harness_config:
type: multi_line type: multi_line

View file

@ -6,3 +6,5 @@ tests:
platform_allow: litex_vexriscv platform_allow: litex_vexriscv
build_only: true build_only: true
tags: tensorflow tags: tensorflow
modules:
- tflite-micro

View file

@ -3,6 +3,8 @@ sample:
name: http_server name: http_server
tests: tests:
sample.net.civetweb.http_server: sample.net.civetweb.http_server:
modules:
- civetweb
harness: net harness: net
arch_exclude: posix arch_exclude: posix
depends_on: netif depends_on: netif

View file

@ -3,4 +3,6 @@ sample:
name: websocket_server name: websocket_server
tests: tests:
sample.net.civetweb.websocket_server: sample.net.civetweb.websocket_server:
modules:
- civetweb
platform_allow: nucleo_h745zi_q_m7 platform_allow: nucleo_h745zi_q_m7

View file

@ -2,7 +2,9 @@ sample:
description: Audio with SOF description: Audio with SOF
name: sof name: sof
common: common:
tags: audio tags: audio
modules:
- sof
tests: tests:
sample.audio.sof: sample.audio.sof:
tags: sof tags: sof

View file

@ -2,6 +2,8 @@ sample:
name: Fat filesystem sample name: Fat filesystem sample
common: common:
tags: filesystem tags: filesystem
modules:
- fatfs
tests: tests:
sample.filesystem.fat_fs: sample.filesystem.fat_fs:
depends_on: sdhc depends_on: sdhc

View file

@ -1,10 +1,13 @@
sample: sample:
name: syst sample name: syst sample
common:
tags: logging mipi-sys-t
modules:
- mipi-sys-t
tests: tests:
sample.logger.syst.v1.deferred: sample.logger.syst.v1.deferred:
extra_args: OVERLAY_CONFIG=overlay_deferred.conf extra_args: OVERLAY_CONFIG=overlay_deferred.conf
platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53 platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53
tags: logging
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line
@ -14,7 +17,6 @@ tests:
- CONFIG_LOG1=y - CONFIG_LOG1=y
sample.logger.syst.v1.immediate: sample.logger.syst.v1.immediate:
platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53 platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53
tags: logging
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line
@ -25,7 +27,6 @@ tests:
sample.logger.syst.v2.deferred: sample.logger.syst.v2.deferred:
extra_args: OVERLAY_CONFIG=overlay_deferred.conf extra_args: OVERLAY_CONFIG=overlay_deferred.conf
platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53 platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53
tags: logging
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line
@ -33,7 +34,6 @@ tests:
- "SYS-T RAW DATA: " - "SYS-T RAW DATA: "
sample.logger.syst.v2.immediate: sample.logger.syst.v2.immediate:
platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53 platform_allow: mps2_an385 qemu_x86 qemu_x86_64 sam_e70_xplained qemu_cortex_a53
tags: logging
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line
@ -42,7 +42,6 @@ tests:
sample.logger.syst.catalog.v2.deferred: sample.logger.syst.catalog.v2.deferred:
extra_args: OVERLAY_CONFIG=overlay_deferred.conf extra_args: OVERLAY_CONFIG=overlay_deferred.conf
platform_allow: mps2_an385 qemu_x86 platform_allow: mps2_an385 qemu_x86
tags: logging
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line
@ -52,7 +51,6 @@ tests:
- CONFIG_LOG_MIPI_SYST_USE_CATALOG=y - CONFIG_LOG_MIPI_SYST_USE_CATALOG=y
sample.logger.syst.catalog.v2.immediate: sample.logger.syst.catalog.v2.immediate:
platform_allow: mps2_an385 qemu_x86 platform_allow: mps2_an385 qemu_x86
tags: logging
harness: console harness: console
harness_config: harness_config:
type: one_line type: one_line

View file

@ -28,6 +28,8 @@ tests:
- "The device is put in USB mass storage mode." - "The device is put in USB mass storage mode."
sample.usb.mass_flash_fatfs: sample.usb.mass_flash_fatfs:
min_ram: 32 min_ram: 32
modules:
- fatfs
depends_on: usb_device depends_on: usb_device
filter: dt_compat_enabled("nordic,qspi-nor") filter: dt_compat_enabled("nordic,qspi-nor")
extra_configs: extra_configs:
@ -41,6 +43,8 @@ tests:
- "The device is put in USB mass storage mode." - "The device is put in USB mass storage mode."
sample.usb.mass_sdhc_fatfs: sample.usb.mass_sdhc_fatfs:
min_ram: 32 min_ram: 32
modules:
- fatfs
depends_on: usb_device sdhc depends_on: usb_device sdhc
extra_configs: extra_configs:
- CONFIG_LOG_DEFAULT_LEVEL=3 - CONFIG_LOG_DEFAULT_LEVEL=3
@ -53,6 +57,8 @@ tests:
regex: regex:
- "The device is put in USB mass storage mode." - "The device is put in USB mass storage mode."
sample.usb.mass_flash_littlefs: sample.usb.mass_flash_littlefs:
modules:
- littlefs
min_ram: 32 min_ram: 32
depends_on: usb_device depends_on: usb_device
filter: dt_compat_enabled("nordic,qspi-nor") filter: dt_compat_enabled("nordic,qspi-nor")

View file

@ -2,6 +2,8 @@ common:
arch_exclude: nios2 posix arch_exclude: nios2 posix
min_ram: 128 min_ram: 128
tags: posix filesystem tags: posix filesystem
modules:
- fatfs
tests: tests:
portability.posix.fs: portability.posix.fs:
extra_configs: extra_configs:

View file

@ -1,8 +1,10 @@
common:
tags: filesystem
modules:
- fatfs
tests: tests:
filesystem.fat.api: filesystem.fat.api:
platform_allow: native_posix platform_allow: native_posix
tags: filesystem
filesystem.fat.api.lfn: filesystem.fat.api.lfn:
extra_args: CONF_FILE="prj_lfn.conf" extra_args: CONF_FILE="prj_lfn.conf"
platform_allow: native_posix platform_allow: native_posix
tags: filesystem

View file

@ -1,7 +1,8 @@
common: common:
tags: filesystem tags: filesystem
platform_allow: nrf52840dk_nrf52840 native_posix native_posix_64 mimxrt1060_evk platform_allow: nrf52840dk_nrf52840 native_posix native_posix_64 mimxrt1060_evk
modules:
- littlefs
tests: tests:
filesystem.littlefs.default: filesystem.littlefs.default:
timeout: 60 timeout: 60

View file

@ -1,8 +1,11 @@
common:
tags: littlefs fatfs filesystem
modules:
- fatfs
- littlefs
tests: tests:
filesystem.multifs: filesystem.multifs:
platform_allow: native_posix qemu_x86 platform_allow: native_posix qemu_x86
tags: littlefs fatfs filesystem qemu_x86
filesystem.fs_shell: filesystem.fs_shell:
extra_args: CONF_FILE="prj_fs_shell.conf" extra_args: CONF_FILE="prj_fs_shell.conf"
platform_allow: native_posix qemu_x86 platform_allow: native_posix qemu_x86
tags: littlefs fatfs filesystem

View file

@ -1,16 +1,16 @@
common:
modules:
- littlefs
tags: logging backend filesystem fs
tests: tests:
logging.log_backend_fs.automounted: logging.log_backend_fs.automounted:
platform_allow: native_posix native_posix_64 nrf52840dk_nrf52840 platform_allow: native_posix native_posix_64 nrf52840dk_nrf52840
tags: logging backend filesystem fs
logging.log_backend_fs.manualmounted.native_posix: logging.log_backend_fs.manualmounted.native_posix:
platform_allow: native_posix platform_allow: native_posix
tags: logging backend filesystem fs
extra_args: DTC_OVERLAY_FILE="./boards/native_posix.overlay;./boards/automount.overlay" extra_args: DTC_OVERLAY_FILE="./boards/native_posix.overlay;./boards/automount.overlay"
logging.log_backend_fs.manualmounted.native_posix_64: logging.log_backend_fs.manualmounted.native_posix_64:
platform_allow: native_posix_64 platform_allow: native_posix_64
tags: logging backend filesystem fs
extra_args: DTC_OVERLAY_FILE="./boards/native_posix_64.overlay;./boards/automount.overlay" extra_args: DTC_OVERLAY_FILE="./boards/native_posix_64.overlay;./boards/automount.overlay"
logging.log_backend_fs.manualmounted.nrf5840dk: logging.log_backend_fs.manualmounted.nrf5840dk:
platform_allow: nrf52840dk_nrf52840 platform_allow: nrf52840dk_nrf52840
tags: logging backend filesystem fs
extra_args: DTC_OVERLAY_FILE="./boards/nrf52840dk_nrf52840.overlay;./boards/automount.overlay" extra_args: DTC_OVERLAY_FILE="./boards/nrf52840dk_nrf52840.overlay;./boards/automount.overlay"