From 543a647f2c806e038a115230f9a0e0ef3b561de5 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:47:01 -0300 Subject: [PATCH 1/3] ci(test): Fix PSRAM test --- tests/validation/psram/diagram.esp32s3.json | 24 +++++++++++++++++++++ tests/validation/psram/psram.ino | 16 +++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/validation/psram/diagram.esp32s3.json diff --git a/tests/validation/psram/diagram.esp32s3.json b/tests/validation/psram/diagram.esp32s3.json new file mode 100644 index 00000000000..837ff1eed33 --- /dev/null +++ b/tests/validation/psram/diagram.esp32s3.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "author": "lucasssvaz", + "editor": "wokwi", + "parts": [ + { + "type": "board-esp32-s3-devkitc-1", + "id": "esp", + "attrs": { "psramType": "octal" } + } + ], + "connections": [ + [ + "esp:TX", + "$serialMonitor:RX", + "" + ], + [ + "esp:RX", + "$serialMonitor:TX", + "" + ] + ] +} diff --git a/tests/validation/psram/psram.ino b/tests/validation/psram/psram.ino index 1304fe85cc1..a53be84fd68 100644 --- a/tests/validation/psram/psram.ino +++ b/tests/validation/psram/psram.ino @@ -4,6 +4,12 @@ #define MAX_TEST_SIZE 512 * 1024 // 512KB void *buf = NULL; +uint32_t psram_size = 0; + +void psram_found(void) { + psram_size = ESP.getPsramSize(); + TEST_ASSERT_TRUE(psram_size > 0); +} void test_malloc_success(void) { buf = ps_malloc(MAX_TEST_SIZE); @@ -96,6 +102,13 @@ void setup() { } UNITY_BEGIN(); + RUN_TEST(psram_found); + + if (psram_size == 0) { + UNITY_END(); + return; + } + RUN_TEST(test_malloc_success); RUN_TEST(test_malloc_fail); RUN_TEST(test_calloc_success); @@ -104,7 +117,8 @@ void setup() { RUN_TEST(test_memset_all_zeroes); RUN_TEST(test_memset_all_ones); RUN_TEST(test_memset_alternating); - RUN_TEST(test_memset_random); + //This test is disabled because it takes too long to run on some wokwi boards + //RUN_TEST(test_memset_random); RUN_TEST(test_memcpy); UNITY_END(); } From 42bd7456ce17013f73110b219e9aa96da4b6306e Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:54:52 -0300 Subject: [PATCH 2/3] ci(test): Fix GPIO test --- tests/validation/gpio/scenario.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/validation/gpio/scenario.yaml b/tests/validation/gpio/scenario.yaml index a915b546b49..957f58b2176 100644 --- a/tests/validation/gpio/scenario.yaml +++ b/tests/validation/gpio/scenario.yaml @@ -6,31 +6,31 @@ steps: - wait-serial: "Button test" # Need for 1s delay for scenario to run properly - - delay: 1000ms + - delay: 5000ms # Press once - set-control: part-id: btn1 control: pressed value: 1 - - delay: 200ms + - delay: 2000ms - set-control: part-id: btn1 control: pressed value: 0 - - delay: 300ms + - delay: 3000ms # Press 2nd time - set-control: part-id: btn1 control: pressed value: 1 - - delay: 200ms + - delay: 2000ms - set-control: part-id: btn1 control: pressed value: 0 - - delay: 300ms + - delay: 3000ms # Press for the 3rd time - set-control: From 988dbe29731e2a2d09db2ed642c06271afa93705 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Sat, 22 Feb 2025 01:27:17 -0300 Subject: [PATCH 3/3] ci(test): Skip some PSRAM tests in P4 --- tests/validation/psram/psram.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/validation/psram/psram.ino b/tests/validation/psram/psram.ino index a53be84fd68..7bf7bc11c5d 100644 --- a/tests/validation/psram/psram.ino +++ b/tests/validation/psram/psram.ino @@ -117,9 +117,11 @@ void setup() { RUN_TEST(test_memset_all_zeroes); RUN_TEST(test_memset_all_ones); RUN_TEST(test_memset_alternating); - //This test is disabled because it takes too long to run on some wokwi boards - //RUN_TEST(test_memset_random); +#ifndef CONFIG_IDF_TARGET_ESP32P4 + // These tests are taking too long on ESP32-P4 in Wokwi + RUN_TEST(test_memset_random); RUN_TEST(test_memcpy); +#endif UNITY_END(); }