1import re
2
3import ttfw_idf
4
5
6@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32c3'])
7def test_examples_wear_levelling(env, extra_data):
8
9    dut = env.get_dut('wear_levelling', 'examples/storage/wear_levelling')
10    dut.start_app()
11    dut.expect_all('example: Mounting FAT filesystem',
12                   'example: Opening file',
13                   'example: File written',
14                   'example: Reading file',
15                   re.compile(r'example: Read from file: \'written using ESP-IDF \S+\''),
16                   'example: Unmounting FAT filesystem',
17                   'example: Done',
18                   timeout=20)
19
20
21if __name__ == '__main__':
22    test_examples_wear_levelling()
23