example_test.py 839 B

1234567891011121314151617181920212223
  1. from __future__ import print_function
  2. import ttfw_idf
  3. @ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3'])
  4. def test_custom_bootloader_impl_example(env, _): # type: ignore
  5. # Test with default build configurations
  6. dut = env.get_dut('main', 'examples/custom_bootloader/bootloader_override')
  7. dut.start_app()
  8. # Expect to read a message from the custom bootloader
  9. # This message is defined in the Kconfig file, retrieve it while deleting
  10. # leading and trailing quotes (")
  11. welcome_message = dut.app.get_sdkconfig()['CONFIG_EXAMPLE_BOOTLOADER_WELCOME_MESSAGE'].strip("\"")
  12. dut.expect(welcome_message)
  13. # Expect to read a message from the user application
  14. dut.expect('Application started!')
  15. if __name__ == '__main__':
  16. test_custom_bootloader_impl_example()