You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement proposal related to a problem? Please describe.
The problem was noticed in #52818. Twister does not currently support testing shell examples.
Describe the solution you'd like
Shell test harness that could be used to check whether specific command can execute on target.
Describe alternatives you've considered
The alternative is to skip testing by adding some unknown harness, e.g. keyboard.
Additional context
Some automated testing can be achieved using expect and picocom. Example testing script is below. The script expects that the user will reset target after starting the script.
#!/usr/bin/expect
set timeout 10
spawn picocom -b 115200 -f none -q /dev/ttyACM0
#Wait for picocom to open port
sleep 2
#Start the shell, e.g. by pressing reset button
expect "uart:~" {} timeout { puts "Prompt timeout"; exit 1 }
send "help\n"
expect "Please refer to shell documentation for more details." {} timeout { puts "no expected output"; exit 2 }
expect "uart:~" {} timeout { puts "No prompt after command"; exit 3 }
#Type in arbitrary string and check if device echoes it back
send "verify echo"
expect "verify echo" {} timeout { puts "Characters not echoed"; exit 4 }
#Send Ctrl+A and Ctrl+X to exit picocom
send -- "\x01"
send -- "\x0A"
puts "\nPASS"
The text was updated successfully, but these errors were encountered:
Is your enhancement proposal related to a problem? Please describe.
The problem was noticed in #52818. Twister does not currently support testing shell examples.
Describe the solution you'd like
Shell test harness that could be used to check whether specific command can execute on target.
Describe alternatives you've considered
The alternative is to skip testing by adding some unknown harness, e.g. keyboard.
Additional context
Some automated testing can be achieved using
expect
andpicocom
. Example testing script is below. The script expects that the user will reset target after starting the script.The text was updated successfully, but these errors were encountered: