[test] include CLI tests in RCP mode (#5159)

This makes expect run all cli-*.exp and posix-*.exp tests in RCP mode.
New scripts should use the function spawn_node in _common.exp to spawn
new processes. This is compatible with both simulation mode and RCP
mode.
This commit is contained in:
Moandor
2020-06-30 08:40:46 -07:00
committed by GitHub
parent d65f8a3812
commit 5acad30791
17 changed files with 128 additions and 94 deletions
+13 -13
View File
@@ -27,24 +27,24 @@
# POSSIBILITY OF SUCH DAMAGE.
#
spawn $env(OT_COMMAND) 1
source "tests/scripts/expect/_common.exp"
set spawn_id [spawn_node 1]
set timeout 1
expect_after {
timeout { exit 1 }
}
send "extaddr 99aabbccddeeff00\n"
expect "Done\r\n"
expect "Done"
send "extaddr 99AABBCCDDEEFF00\n"
expect "Done\r\n"
expect "Done"
send "extaddr\n"
expect "99aabbccddeeff00\r\n"
expect "99aabbccddeeff00"
send "extaddr 1\n"
expect "Error 7: InvalidArgs\r\n"
expect "Error 7: InvalidArgs"
send "extaddr 0123456789abcdef0\n"
expect "Error 7: InvalidArgs\r\n"
expect "Error 7: InvalidArgs"
send "extaddr invalid\n"
expect "Error 7: InvalidArgs\r\n"
expect "Error 7: InvalidArgs"
send "extaddr\n"
expect "99aabbccddeeff00\r\n"
send "\x04"
expect eof
expect "99aabbccddeeff00"
dispose