example_test.py 978 B

12345678910111213141516171819202122232425262728
  1. from __future__ import unicode_literals
  2. import ttfw_idf
  3. @ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32'])
  4. def test_examples_ipc_isr(env, _): # type: (ttfw_idf.TinyFW.Env, None) -> None
  5. dut = env.get_dut('ipc_isr', 'examples/system/ipc/ipc_isr')
  6. dut.start_app()
  7. dut.expect_all('example: Start',
  8. 'example: PS_INTLEVEL = 0x5',
  9. 'example: PS_EXCM = 0x0',
  10. 'example: PS_UM = 0x1',
  11. 'example: in[0] = 0x1',
  12. 'example: in[1] = 0x2',
  13. 'example: in[2] = 0x3',
  14. 'example: out[0] = (in[0] | in[1] | in[2]) = 0x3',
  15. 'example: out[1] = (in[0] & in[1] & in[2]) = 0x6',
  16. 'example: out[2] = in[2] = 0x3',
  17. 'example: out[3] = PS of other cpu = 0x25',
  18. 'example: End',
  19. timeout=10)
  20. if __name__ == '__main__':
  21. test_examples_ipc_isr()