diff options
Diffstat (limited to 'unix/main.c')
-rw-r--r-- | unix/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/unix/main.c b/unix/main.c index abea157286..9794f60836 100644 --- a/unix/main.c +++ b/unix/main.c @@ -356,6 +356,13 @@ int main(int argc, char **argv) { mp_obj_list_init(mp_sys_argv, 0); + #if defined(MICROPY_UNIX_COVERAGE) + { + MP_DECLARE_CONST_FUN_OBJ(extra_coverage_obj); + mp_store_global(QSTR_FROM_STR_STATIC("extra_coverage"), (mp_obj_t)&extra_coverage_obj); + } + #endif + // Here is some example code to create a class and instance of that class. // First is the Python, then the C code. // @@ -434,12 +441,6 @@ int main(int argc, char **argv) { MP_STATE_VM(mp_optimise_value) = 0; for (char *p = argv[a] + 1; *p && *p == 'O'; p++, MP_STATE_VM(mp_optimise_value)++); } - #if defined(MICROPY_UNIX_COVERAGE) - } else if (strcmp(argv[a], "--coverage") == 0) { - void run_extra_coverage_tests(void); - run_extra_coverage_tests(); - ret = 0; - #endif } else { return usage(argv); } |