mirror of
https://github.com/lupyuen/nuttx-ox64.git
synced 2025-01-13 05:08:29 +08:00
Create nuttx.exp
This commit is contained in:
parent
7a706c3c74
commit
6c538c9ce2
1 changed files with 28 additions and 0 deletions
28
nuttx.exp
Normal file
28
nuttx.exp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/expect
|
||||
## Expect Script for Testing NuttX with Ox64 BL808 Emulator
|
||||
|
||||
## For every 1 character sent, wait 0.001 milliseconds
|
||||
set send_slow {1 0.001}
|
||||
|
||||
## Start the Ox64 BL808 Emulator
|
||||
spawn ./temu nuttx.cfg
|
||||
|
||||
## Wait for the prompt and enter `uname -a`
|
||||
expect "nsh> "
|
||||
send -s "uname -a\r"
|
||||
|
||||
## Wait for the prompt and enter `ostest`
|
||||
expect "nsh> "
|
||||
send -s "ostest\r"
|
||||
|
||||
## Wait at most 30 seconds
|
||||
set timeout 30
|
||||
|
||||
## Check the response...
|
||||
expect {
|
||||
## If we see this message, exit normally
|
||||
"ostest_main: Exiting with status -1" { exit 0 }
|
||||
|
||||
## If timeout, exit with an error
|
||||
timeout { exit 1 }
|
||||
}
|
Loading…
Reference in a new issue