Skip to content

Commit

Permalink
ci(hil): Touch skip file whe platform is skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
P-R-O-C-H-Y committed May 9, 2024
1 parent e883a2c commit a039d34
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 30 deletions.
4 changes: 3 additions & 1 deletion .github/scripts/tests_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wokwi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}`);
Expand Down
Empty file.
Empty file.
Empty file.
25 changes: 0 additions & 25 deletions tests/validation/touch/touch.ino
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#include <unity.h>
#include "soc/soc_caps.h"

#if SOC_TOUCH_SENSOR_NUM > 0

#include "driver/touch_pad.h"

#if CONFIG_IDF_TARGET_ESP32
Expand Down Expand Up @@ -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

0 comments on commit a039d34

Please sign in to comment.