File tree 3 files changed +25
-0
lines changed 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,17 @@ static void pairheap_test(size_t nops, int *ops) {
184
184
mp_printf (& mp_plat_print , "\n" );
185
185
}
186
186
187
+ static mp_sched_node_t mp_coverage_sched_node ;
188
+
189
+ static void coverage_sched_function (mp_sched_node_t * node ) {
190
+ (void )node ;
191
+ static mp_uint_t loop = 3 ;
192
+ mp_printf (& mp_plat_print , "scheduled function\n" );
193
+ if (-- loop ) {
194
+ mp_sched_schedule_node (& mp_coverage_sched_node , coverage_sched_function );
195
+ }
196
+ }
197
+
187
198
// function to run extra tests for things that can't be checked by scripts
188
199
static mp_obj_t extra_coverage (void ) {
189
200
// mp_printf (used by ports that don't have a native printf)
@@ -621,6 +632,12 @@ static mp_obj_t extra_coverage(void) {
621
632
mp_obj_print_exception (& mp_plat_print , MP_OBJ_FROM_PTR (nlr .ret_val ));
622
633
}
623
634
mp_handle_pending (true);
635
+
636
+ mp_sched_schedule_node (& mp_coverage_sched_node , coverage_sched_function );
637
+ for (int i = 0 ; i <= 3 ; ++ i ) {
638
+ mp_printf (& mp_plat_print , "loop\n" );
639
+ mp_handle_pending (true);
640
+ }
624
641
}
625
642
626
643
// ringbuf
Original file line number Diff line number Diff line change 44
44
#undef MICROPY_VFS_ROM_IOCTL
45
45
#define MICROPY_VFS_ROM_IOCTL (1)
46
46
#define MICROPY_PY_CRYPTOLIB_CTR (1)
47
+ #define MICROPY_SCHEDULER_STATIC_NODES (1)
47
48
48
49
// Enable os.uname for attrtuple coverage test
49
50
#define MICROPY_PY_OS_UNAME (1)
Original file line number Diff line number Diff line change @@ -122,6 +122,13 @@ unlocked
122
122
KeyboardInterrupt:
123
123
KeyboardInterrupt:
124
124
10
125
+ loop
126
+ scheduled function
127
+ loop
128
+ scheduled function
129
+ loop
130
+ scheduled function
131
+ loop
125
132
# ringbuf
126
133
99 0
127
134
98 1
You can’t perform that action at this time.
0 commit comments