File tree 3 files changed +45
-5
lines changed
3 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 6
6
- wait-serial : " Button test"
7
7
8
8
# Need for 1s delay for scenario to run properly
9
- - delay : 1000ms
9
+ - delay : 5000ms
10
10
11
11
# Press once
12
12
- set-control :
13
13
part-id : btn1
14
14
control : pressed
15
15
value : 1
16
- - delay : 200ms
16
+ - delay : 2000ms
17
17
- set-control :
18
18
part-id : btn1
19
19
control : pressed
20
20
value : 0
21
- - delay : 300ms
21
+ - delay : 3000ms
22
22
23
23
# Press 2nd time
24
24
- set-control :
25
25
part-id : btn1
26
26
control : pressed
27
27
value : 1
28
- - delay : 200ms
28
+ - delay : 2000ms
29
29
- set-control :
30
30
part-id : btn1
31
31
control : pressed
32
32
value : 0
33
- - delay : 300ms
33
+ - delay : 3000ms
34
34
35
35
# Press for the 3rd time
36
36
- 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 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,8 +117,11 @@ 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);
120
+ #ifndef CONFIG_IDF_TARGET_ESP32P4
121
+ // These tests are taking too long on ESP32-P4 in Wokwi
107
122
RUN_TEST (test_memset_random);
108
123
RUN_TEST (test_memcpy);
124
+ #endif
109
125
UNITY_END ();
110
126
}
111
127
You can’t perform that action at this time.
0 commit comments