Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
SuGlider authored Feb 23, 2025
2 parents 38873af + 988dbe2 commit 5779ef1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/validation/gpio/scenario.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 24 additions & 0 deletions tests/validation/psram/diagram.esp32s3.json
Original file line number Diff line number Diff line change
@@ -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",
""
]
]
}
16 changes: 16 additions & 0 deletions tests/validation/psram/psram.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -104,8 +117,11 @@ void setup() {
RUN_TEST(test_memset_all_zeroes);
RUN_TEST(test_memset_all_ones);
RUN_TEST(test_memset_alternating);
#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();
}

Expand Down

0 comments on commit 5779ef1

Please sign in to comment.