File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed 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,7 +117,8 @@ void setup() {
104117 RUN_TEST (test_memset_all_zeroes);
105118 RUN_TEST (test_memset_all_ones);
106119 RUN_TEST (test_memset_alternating);
107- RUN_TEST (test_memset_random);
120+ // This test is disabled because it takes too long to run on some wokwi boards
121+ // RUN_TEST(test_memset_random);
108122 RUN_TEST (test_memcpy);
109123 UNITY_END ();
110124}
You can’t perform that action at this time.
0 commit comments