From a039d346dac641eb5850ec5b80b79ddb3aa3e898 Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Thu, 9 May 2024 10:49:51 +0200 Subject: [PATCH] ci(hil): Touch skip file whe platform is skipped --- .github/scripts/tests_run.sh | 4 +++- .github/workflows/hil.yml | 4 ++-- .github/workflows/wokwi.yml | 4 ++-- tests/validation/touch/.skip.esp32c3 | 0 tests/validation/touch/.skip.esp32c6 | 0 tests/validation/touch/.skip.esp32h2 | 0 tests/validation/touch/touch.ino | 25 ------------------------- 7 files changed, 7 insertions(+), 30 deletions(-) create mode 100644 tests/validation/touch/.skip.esp32c3 create mode 100644 tests/validation/touch/.skip.esp32c6 create mode 100644 tests/validation/touch/.skip.esp32h2 diff --git a/.github/scripts/tests_run.sh b/.github/scripts/tests_run.sh index 5e0b7b615e3..67e4482ad93 100755 --- a/.github/scripts/tests_run.sh +++ b/.github/scripts/tests_run.sh @@ -9,7 +9,9 @@ function run_test() { local sketchname=$(basename $sketchdir) if [[ -f "$sketchdir/.skip.$platform" ]]; then - echo "Skipping $sketchname test in $target" + echo "Skipping $sketchname test for $target, platform: $platform" + skipfile="$sketchdir/.test_skipped" + touch $skipfile exit 0 fi diff --git a/.github/workflows/hil.yml b/.github/workflows/hil.yml index 65e218d73d2..73d8e50a1dd 100644 --- a/.github/workflows/hil.yml +++ b/.github/workflows/hil.yml @@ -124,7 +124,7 @@ jobs: - name: Check if tests were skipped id: check-test-skipped run: | - if [ -f ~/.test_skipped ]; then + if [ $(find "$HOME" -name ".test_skipped") ]; then echo "skipped=true" >> $GITHUB_OUTPUT else echo "skipped=false" >> $GITHUB_OUTPUT @@ -175,7 +175,7 @@ jobs: - name: Check if tests were skipped id: check-test-skipped run: | - if [ -f ~/.test_skipped ]; then + if [ $(find "$HOME" -name ".test_skipped") ]; then echo "skipped=true" >> $GITHUB_OUTPUT else echo "skipped=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/wokwi.yml b/.github/workflows/wokwi.yml index 5ed28560313..22252352382 100644 --- a/.github/workflows/wokwi.yml +++ b/.github/workflows/wokwi.yml @@ -85,7 +85,7 @@ jobs: - name: Check if tests were skipped id: check-test-skipped run: | - if [ -f ~/.test_skipped ]; then + if [ $(find "tests" -name ".test_skipped") ]; then echo "skipped=true" >> $GITHUB_OUTPUT else echo "skipped=false" >> $GITHUB_OUTPUT @@ -112,7 +112,7 @@ jobs: const owner = '${{ github.repository_owner }}'; const repo = '${{ github.repository }}'.split('/')[1]; const sha = '${{ github.event.workflow_run.head_sha }}'; - const result = '${{ needs.wokwi-test.result }}'; + const result = '${{ needs.wokwi-test.result }}' == 'success' ? 'success' : 'failure'; core.debug(`owner: ${owner}`); core.debug(`repo: ${repo}`); core.debug(`sha: ${sha}`); diff --git a/tests/validation/touch/.skip.esp32c3 b/tests/validation/touch/.skip.esp32c3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/validation/touch/.skip.esp32c6 b/tests/validation/touch/.skip.esp32c6 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/validation/touch/.skip.esp32h2 b/tests/validation/touch/.skip.esp32h2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/validation/touch/touch.ino b/tests/validation/touch/touch.ino index 7d4aaf031a8..60f6e7f7966 100644 --- a/tests/validation/touch/touch.ino +++ b/tests/validation/touch/touch.ino @@ -1,8 +1,5 @@ #include #include "soc/soc_caps.h" - -#if SOC_TOUCH_SENSOR_NUM > 0 - #include "driver/touch_pad.h" #if CONFIG_IDF_TARGET_ESP32 @@ -150,25 +147,3 @@ void setup() { } void loop() {} - -#else -//PASS TEST for UNSUPPORTED CHIPS - -void test_pass(void) { - TEST_ASSERT_EQUAL(1, 1); -} - -void setup() { - Serial.begin(115200); - while (!Serial) { - ; - } - - UNITY_BEGIN(); - RUN_TEST(test_pass); - UNITY_END(); -} - -void loop() {} - -#endif