Skip to content

Commit d642cce

Browse files
projectgusdpgeorge
authored andcommitted
unix: Use the bare metal mbedTLS config in the coverage buiid.
This allows coverage to test MicroPython-specific features such as the tracked alloc cleanups added in the parent commit. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent 97f444b commit d642cce

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ports/unix/mbedtls/mbedtls_config_port.h

+11
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,18 @@
3232
// Enable mbedtls modules
3333
#define MBEDTLS_TIMING_C
3434

35+
#if defined(MICROPY_UNIX_COVERAGE)
36+
// Test the "bare metal" memory management in the coverage build
37+
#define MICROPY_MBEDTLS_CONFIG_BARE_METAL (1)
38+
#endif
39+
3540
// Include common mbedtls configuration.
3641
#include "extmod/mbedtls/mbedtls_config_common.h"
3742

43+
#if defined(MICROPY_UNIX_COVERAGE)
44+
// See comment above, but fall back to the default platform entropy functions
45+
#undef MBEDTLS_ENTROPY_HARDWARE_ALT
46+
#undef MBEDTLS_NO_PLATFORM_ENTROPY
47+
#endif
48+
3849
#endif /* MICROPY_INCLUDED_MBEDTLS_CONFIG_H */

0 commit comments

Comments
 (0)