pytest_flash_mmap.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: Apache-2.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. @pytest.mark.supported_targets
  6. @pytest.mark.generic
  7. @pytest.mark.parametrize(
  8. 'config',
  9. [
  10. 'release',
  11. ],
  12. indirect=True,
  13. )
  14. def test_flash_mmap(dut: Dut) -> None:
  15. dut.run_all_single_board_cases(timeout=30)
  16. @pytest.mark.esp32s3
  17. @pytest.mark.esp32c3
  18. @pytest.mark.esp32c2
  19. @pytest.mark.esp32c6
  20. @pytest.mark.esp32h2
  21. @pytest.mark.generic
  22. @pytest.mark.parametrize(
  23. 'config',
  24. [
  25. 'rom_impl',
  26. ],
  27. indirect=True,
  28. )
  29. def test_flash_mmap_rom_impl(dut: Dut) -> None:
  30. dut.run_all_single_board_cases(timeout=30)
  31. XIP_CONFIGS = [
  32. pytest.param('xip_psram_esp32s2', marks=[pytest.mark.esp32s2]),
  33. pytest.param('xip_psram_esp32s3', marks=[pytest.mark.esp32s3]),
  34. ]
  35. @pytest.mark.generic
  36. @pytest.mark.parametrize('config', XIP_CONFIGS, indirect=True)
  37. def test_flash_mmap_xip_psram(dut: Dut) -> None:
  38. dut.run_all_single_board_cases(timeout=30)
  39. @pytest.mark.esp32s3
  40. @pytest.mark.generic
  41. @pytest.mark.parametrize(
  42. 'config',
  43. [
  44. 'xip_psram_with_rom_impl',
  45. ],
  46. indirect=True,
  47. )
  48. def test_flash_mmap_xip_psram_rom_impl(dut: Dut) -> None:
  49. dut.run_all_single_board_cases(timeout=30)