From 08d35da057525d54d2b791b73644bf4602ac1b33 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Mon, 8 Jul 2024 10:22:06 +0200 Subject: [PATCH] add way to exclude tests from all --- script/test_build_components | 9 +++++++++ .../components/datetime/exclude.test.nrf52-adafruit.yaml | 0 tests/components/datetime/exclude.test.nrf52-mcumgr.yaml | 0 3 files changed, 9 insertions(+) create mode 100644 tests/components/datetime/exclude.test.nrf52-adafruit.yaml create mode 100644 tests/components/datetime/exclude.test.nrf52-mcumgr.yaml diff --git a/script/test_build_components b/script/test_build_components index 9bbb694dcc..7789f84581 100755 --- a/script/test_build_components +++ b/script/test_build_components @@ -53,6 +53,10 @@ for f in ./tests/components/$target_component/*.*.yaml; do IFS='.' read -r -a file_name <<< "${folder_name[4]}" test_name="${file_name[0]}" + if [ "$test_name" = "exclude" ]; then + # this is not a test file. we need to skip it. + continue + fi target_platform="${file_name[1]}" file_name_parts=${#file_name[@]} @@ -64,6 +68,11 @@ for f in ./tests/components/$target_component/*.*.yaml; do IFS='.' read -r -a file_name <<< "${folder_name[3]}" target_platform="${file_name[1]}" + if [ -f "./tests/components/$target_component/exclude.$test_name.$target_platform.yaml" ]; then + echo "Component $target_component is excluded from testing on $target_platform" + continue + fi + start_esphome done diff --git a/tests/components/datetime/exclude.test.nrf52-adafruit.yaml b/tests/components/datetime/exclude.test.nrf52-adafruit.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/components/datetime/exclude.test.nrf52-mcumgr.yaml b/tests/components/datetime/exclude.test.nrf52-mcumgr.yaml new file mode 100644 index 0000000000..e69de29bb2