From fcfed6a0ea763ff14ea2bf819179fdf7eecda889 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 20 Jun 2025 19:44:07 +0200 Subject: [PATCH] unix/variants/coverage: Enable sys.settrace. The unix coverage variant should have all features enabled, so they can be tested for coverage. Therefore, enabled `MICROPY_PY_SYS_SETTRACE`. Signed-off-by: Jeff Epler --- ports/unix/variants/coverage/mpconfigvariant.h | 1 + tests/ports/unix/extra_coverage.py.exp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/unix/variants/coverage/mpconfigvariant.h b/ports/unix/variants/coverage/mpconfigvariant.h index cfefeb467..2f5d9683b 100644 --- a/ports/unix/variants/coverage/mpconfigvariant.h +++ b/ports/unix/variants/coverage/mpconfigvariant.h @@ -39,6 +39,7 @@ // Enable additional features. #define MICROPY_DEBUG_PARSE_RULE_NAME (1) +#define MICROPY_PY_SYS_SETTRACE (1) #define MICROPY_TRACKED_ALLOC (1) #define MICROPY_WARNINGS_CATEGORY (1) #undef MICROPY_VFS_ROM_IOCTL diff --git a/tests/ports/unix/extra_coverage.py.exp b/tests/ports/unix/extra_coverage.py.exp index ac64edde6..ed21ced24 100644 --- a/tests/ports/unix/extra_coverage.py.exp +++ b/tests/ports/unix/extra_coverage.py.exp @@ -69,8 +69,8 @@ argv atexit byteorder exc_info executable exit getsizeof implementation intern maxsize modules path platform print_exception ps1 -ps2 stderr stdin stdout -tracebacklimit version version_info +ps2 settrace stderr stdin +stdout tracebacklimit version version_info ementation # attrtuple (start=1, stop=2, step=3)