pytest_custom_bootloader_override.py 741 B

123456789101112131415161718192021
  1. # SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: CC0-1.0
  3. import pytest
  4. from pytest_embedded.dut import Dut
  5. from pytest_embedded_idf.app import IdfApp
  6. @pytest.mark.esp32
  7. @pytest.mark.esp32s2
  8. @pytest.mark.esp32c3
  9. @pytest.mark.generic
  10. def test_custom_bootloader_impl_example(app: IdfApp, dut: Dut) -> None:
  11. # Expect to read a message from the custom bootloader
  12. # This message is defined in the Kconfig file, retrieve it while deleting
  13. # leading and trailing quotes (")
  14. welcome_message = app.sdkconfig['EXAMPLE_BOOTLOADER_WELCOME_MESSAGE']
  15. dut.expect_exact(welcome_message)
  16. # Expect to read a message from the user application
  17. dut.expect_exact('Application started!')