1from __future__ import print_function
2
3import ttfw_idf
4
5
6@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3'])
7def test_custom_bootloader_hooks_example(env, _):  # type: ignore
8    # Test with default build configurations
9    dut = env.get_dut('main', 'examples/custom_bootloader/bootloader_hooks')
10    dut.start_app()
11
12    # Expect to read both hooks messages
13    dut.expect('This hook is called BEFORE bootloader initialization')
14    dut.expect('This hook is called AFTER bootloader initialization')
15
16
17if __name__ == '__main__':
18    test_custom_bootloader_hooks_example()
19