File tree Expand file tree Collapse file tree 3 files changed +45
-5
lines changed Expand file tree Collapse file tree 3 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 66 - wait-serial : " Button test"
77
88 # Need for 1s delay for scenario to run properly
9- - delay : 1000ms
9+ - delay : 5000ms
1010
1111 # Press once
1212 - set-control :
1313 part-id : btn1
1414 control : pressed
1515 value : 1
16- - delay : 200ms
16+ - delay : 2000ms
1717 - set-control :
1818 part-id : btn1
1919 control : pressed
2020 value : 0
21- - delay : 300ms
21+ - delay : 3000ms
2222
2323 # Press 2nd time
2424 - set-control :
2525 part-id : btn1
2626 control : pressed
2727 value : 1
28- - delay : 200ms
28+ - delay : 2000ms
2929 - set-control :
3030 part-id : btn1
3131 control : pressed
3232 value : 0
33- - delay : 300ms
33+ - delay : 3000ms
3434
3535 # Press for the 3rd time
3636 - set-control :
Original file line number Diff line number Diff line change 1+ {
2+ "version" : 1 ,
3+ "author" : " lucasssvaz" ,
4+ "editor" : " wokwi" ,
5+ "parts" : [
6+ {
7+ "type" : " board-esp32-s3-devkitc-1" ,
8+ "id" : " esp" ,
9+ "attrs" : { "psramType" : " octal" }
10+ }
11+ ],
12+ "connections" : [
13+ [
14+ " esp:TX" ,
15+ " $serialMonitor:RX" ,
16+ " "
17+ ],
18+ [
19+ " esp:RX" ,
20+ " $serialMonitor:TX" ,
21+ " "
22+ ]
23+ ]
24+ }
Original file line number Diff line number Diff line change 44#define MAX_TEST_SIZE 512 * 1024 // 512KB
55
66void *buf = NULL ;
7+ uint32_t psram_size = 0 ;
8+
9+ void psram_found (void ) {
10+ psram_size = ESP.getPsramSize ();
11+ TEST_ASSERT_TRUE (psram_size > 0 );
12+ }
713
814void test_malloc_success (void ) {
915 buf = ps_malloc (MAX_TEST_SIZE);
@@ -96,6 +102,13 @@ void setup() {
96102 }
97103
98104 UNITY_BEGIN ();
105+ RUN_TEST (psram_found);
106+
107+ if (psram_size == 0 ) {
108+ UNITY_END ();
109+ return ;
110+ }
111+
99112 RUN_TEST (test_malloc_success);
100113 RUN_TEST (test_malloc_fail);
101114 RUN_TEST (test_calloc_success);
@@ -104,8 +117,11 @@ void setup() {
104117 RUN_TEST (test_memset_all_zeroes);
105118 RUN_TEST (test_memset_all_ones);
106119 RUN_TEST (test_memset_alternating);
120+ #ifndef CONFIG_IDF_TARGET_ESP32P4
121+ // These tests are taking too long on ESP32-P4 in Wokwi
107122 RUN_TEST (test_memset_random);
108123 RUN_TEST (test_memcpy);
124+ #endif
109125 UNITY_END ();
110126}
111127
You can’t perform that action at this time.
0 commit comments