pytest_himem.py 587 B

1234567891011121314151617
  1. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: CC0-1.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. @pytest.mark.esp32
  6. @pytest.mark.generic
  7. def test_himem(dut: Dut) -> None:
  8. mem = dut.expect(r'esp_himem: Initialized. Using last \d+ 32KB address blocks for bank '
  9. r'switching on (\d+) KB of physical memory.').group(1).decode('utf8')
  10. dut.expect(r'Himem has {}KiB of memory, \d+KiB of which is free.'.format(mem), timeout=10)
  11. dut.expect_exact('Testing the free memory...')
  12. dut.expect_exact('Done!')