spiffs_example_test.py 714 B

12345678910111213141516171819202122
  1. import re
  2. import ttfw_idf
  3. @ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
  4. def test_examples_spiffs(env, extra_data):
  5. dut = env.get_dut('spiffs', 'examples/storage/spiffs')
  6. dut.start_app()
  7. dut.expect_all('example: Initializing SPIFFS',
  8. re.compile(r'example: Partition size: total: \d+, used: \d+'),
  9. 'example: Opening file',
  10. 'example: File written',
  11. 'example: Renaming file',
  12. 'example: Reading file',
  13. 'example: Read from file: \'Hello World!\'',
  14. 'example: SPIFFS unmounted',
  15. timeout=20)
  16. if __name__ == '__main__':
  17. test_examples_spiffs()