2019-10-18 17:26:57 +00:00
|
|
|
from __future__ import print_function
|
|
|
|
|
2019-11-27 03:58:07 +00:00
|
|
|
import ttfw_idf
|
2019-10-18 17:26:57 +00:00
|
|
|
|
|
|
|
|
2021-03-12 06:05:17 +00:00
|
|
|
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32c3'])
|
2019-10-18 17:26:57 +00:00
|
|
|
def test_examples_system_console(env, extra_data):
|
|
|
|
dut = env.get_dut('console_example', 'examples/system/console', app_config_name='history')
|
2021-01-26 02:49:01 +00:00
|
|
|
print('Using binary path: {}'.format(dut.app.binary_path))
|
2019-10-18 17:26:57 +00:00
|
|
|
dut.start_app()
|
2021-01-26 02:49:01 +00:00
|
|
|
dut.expect('Command history enabled')
|
2019-10-18 17:26:57 +00:00
|
|
|
env.close_dut(dut.name)
|
|
|
|
|
|
|
|
dut = env.get_dut('console_example', 'examples/system/console', app_config_name='nohistory')
|
2021-01-26 02:49:01 +00:00
|
|
|
print('Using binary path: {}'.format(dut.app.binary_path))
|
2019-10-18 17:26:57 +00:00
|
|
|
dut.start_app()
|
2021-01-26 02:49:01 +00:00
|
|
|
dut.expect('Command history disabled')
|
2019-10-18 17:26:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_examples_system_console()
|