Skip to content

Commit 84376a7

Browse files
authored
ci(hil): Touch skip file whe platform is skipped (espressif#9605)
1 parent e883a2c commit 84376a7

File tree

7 files changed

+8
-31
lines changed

7 files changed

+8
-31
lines changed

.github/scripts/tests_run.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ function run_test() {
99
local sketchname=$(basename $sketchdir)
1010

1111
if [[ -f "$sketchdir/.skip.$platform" ]]; then
12-
echo "Skipping $sketchname test in $target"
12+
echo "Skipping $sketchname test for $target, platform: $platform"
13+
skipfile="$sketchdir/.test_skipped"
14+
touch $skipfile
1315
exit 0
1416
fi
1517

@@ -166,7 +168,7 @@ else
166168
start_index=$(( $chunk_index * $chunk_size ))
167169
if [ "$sketchcount" -le "$start_index" ]; then
168170
echo "Skipping job"
169-
touch ~/.test_skipped
171+
touch $PWD/tests/.test_skipped
170172
exit 0
171173
fi
172174

.github/workflows/hil.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
- name: Check if tests were skipped
125125
id: check-test-skipped
126126
run: |
127-
if [ -f ~/.test_skipped ]; then
127+
if [ $(find "tests" -name ".test_skipped") ]; then
128128
echo "skipped=true" >> $GITHUB_OUTPUT
129129
else
130130
echo "skipped=false" >> $GITHUB_OUTPUT
@@ -175,7 +175,7 @@ jobs:
175175
- name: Check if tests were skipped
176176
id: check-test-skipped
177177
run: |
178-
if [ -f ~/.test_skipped ]; then
178+
if [ $(find "tests" -name ".test_skipped") ]; then
179179
echo "skipped=true" >> $GITHUB_OUTPUT
180180
else
181181
echo "skipped=false" >> $GITHUB_OUTPUT

.github/workflows/wokwi.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- name: Check if tests were skipped
8686
id: check-test-skipped
8787
run: |
88-
if [ -f ~/.test_skipped ]; then
88+
if [ $(find "tests" -name ".test_skipped") ]; then
8989
echo "skipped=true" >> $GITHUB_OUTPUT
9090
else
9191
echo "skipped=false" >> $GITHUB_OUTPUT
@@ -112,7 +112,7 @@ jobs:
112112
const owner = '${{ github.repository_owner }}';
113113
const repo = '${{ github.repository }}'.split('/')[1];
114114
const sha = '${{ github.event.workflow_run.head_sha }}';
115-
const result = '${{ needs.wokwi-test.result }}';
115+
const result = '${{ needs.wokwi-test.result }}' == 'success' ? 'success' : 'failure';
116116
core.debug(`owner: ${owner}`);
117117
core.debug(`repo: ${repo}`);
118118
core.debug(`sha: ${sha}`);

tests/validation/touch/.skip.esp32c3

Whitespace-only changes.

tests/validation/touch/.skip.esp32c6

Whitespace-only changes.

tests/validation/touch/.skip.esp32h2

Whitespace-only changes.

tests/validation/touch/touch.ino

-25
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#include <unity.h>
22
#include "soc/soc_caps.h"
3-
4-
#if SOC_TOUCH_SENSOR_NUM > 0
5-
63
#include "driver/touch_pad.h"
74

85
#if CONFIG_IDF_TARGET_ESP32
@@ -150,25 +147,3 @@ void setup() {
150147
}
151148

152149
void loop() {}
153-
154-
#else
155-
//PASS TEST for UNSUPPORTED CHIPS
156-
157-
void test_pass(void) {
158-
TEST_ASSERT_EQUAL(1, 1);
159-
}
160-
161-
void setup() {
162-
Serial.begin(115200);
163-
while (!Serial) {
164-
;
165-
}
166-
167-
UNITY_BEGIN();
168-
RUN_TEST(test_pass);
169-
UNITY_END();
170-
}
171-
172-
void loop() {}
173-
174-
#endif

0 commit comments

Comments
 (0)