diff options
author | Damien George <damien@micropython.org> | 2024-01-18 16:32:31 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-01-22 11:48:27 +1100 |
commit | 7bbcee3cf09a08199b3ffefb6c5e37208cba5f0a (patch) | |
tree | 6260794d34aaef18fcf5a6521ff3d103bc962dbf /tests/esp32/esp32_idf_heap_info.py | |
parent | f93ffc2875c57ce3b8a608ebf5ae9050aa62f069 (diff) | |
download | micropython-7bbcee3cf09a08199b3ffefb6c5e37208cba5f0a.tar.gz micropython-7bbcee3cf09a08199b3ffefb6c5e37208cba5f0a.zip |
tests: Move port-specific test directories into tests/ports/ directory.
To keep them all together, mirroring the top-level directory structure.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/esp32/esp32_idf_heap_info.py')
-rw-r--r-- | tests/esp32/esp32_idf_heap_info.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/esp32/esp32_idf_heap_info.py b/tests/esp32/esp32_idf_heap_info.py deleted file mode 100644 index fdd89161f4..0000000000 --- a/tests/esp32/esp32_idf_heap_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# Test the esp32's esp32.idf_heap_info to return sane data -try: - import esp32 -except ImportError: - print("SKIP") - raise SystemExit - - -# region tuple is: (size, free, largest free, min free) -# we check that each region's size is > 0 and that the free amounts are smaller than the size -def chk_heap(kind, regions): - chk = [True, True, True, True] - for r in regions: - chk = [ - chk[0] and r[0] > 0, - chk[1] and r[1] <= r[0], - chk[2] and r[2] <= r[0], - chk[3] and r[3] <= r[0], - ] - print(kind, chk) - - -# try getting heap regions -regions = esp32.idf_heap_info(esp32.HEAP_DATA) -print("HEAP_DATA >2:", len(regions) > 2) -chk_heap("HEAP_DATA", regions) - -# try getting code regions -regions = esp32.idf_heap_info(esp32.HEAP_EXEC) -print("HEAP_EXEC >2:", len(regions) > 2) -chk_heap("HEAP_EXEC", regions) - -# try invalid param -print(esp32.idf_heap_info(-1)) |