File tree 2 files changed +39
-1
lines changed
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 4
4
#define MAX_TEST_SIZE 512 * 1024 // 512KB
5
5
6
6
void *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
+ }
7
13
8
14
void test_malloc_success (void ) {
9
15
buf = ps_malloc (MAX_TEST_SIZE);
@@ -96,6 +102,13 @@ void setup() {
96
102
}
97
103
98
104
UNITY_BEGIN ();
105
+ RUN_TEST (psram_found);
106
+
107
+ if (psram_size == 0 ) {
108
+ UNITY_END ();
109
+ return ;
110
+ }
111
+
99
112
RUN_TEST (test_malloc_success);
100
113
RUN_TEST (test_malloc_fail);
101
114
RUN_TEST (test_calloc_success);
@@ -104,7 +117,8 @@ void setup() {
104
117
RUN_TEST (test_memset_all_zeroes);
105
118
RUN_TEST (test_memset_all_ones);
106
119
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);
108
122
RUN_TEST (test_memcpy);
109
123
UNITY_END ();
110
124
}
You can’t perform that action at this time.
0 commit comments