mirror of
https://github.com/lupyuen/nuttx-ox64.git
synced 2025-01-12 20:58:31 +08:00
Exit with status 0 instead of -1
This commit is contained in:
parent
b294b4c743
commit
0e2e78e43f
1 changed files with 24 additions and 4 deletions
28
nuttx.exp
28
nuttx.exp
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/expect
|
||||
## Expect Script for Testing NuttX with Ox64 BL808 Emulator
|
||||
|
||||
## Wait at most 30 seconds
|
||||
set timeout 30
|
||||
|
||||
## For every 1 character sent, wait 0.001 milliseconds
|
||||
set send_slow {1 0.001}
|
||||
|
||||
|
@ -11,17 +14,34 @@ spawn ./temu nuttx.cfg
|
|||
expect "nsh> "
|
||||
send -s "uname -a\r"
|
||||
|
||||
## Wait for the prompt and enter `free`
|
||||
expect "nsh> "
|
||||
send -s "free\r"
|
||||
|
||||
## Wait for the prompt and enter `hello`
|
||||
expect "nsh> "
|
||||
send -s "hello\r"
|
||||
|
||||
## Wait for the prompt and enter `getprime`
|
||||
expect "nsh> "
|
||||
send -s "getprime\r"
|
||||
|
||||
## Wait for the prompt and enter `hello`
|
||||
expect "nsh> "
|
||||
send -s "hello\r"
|
||||
|
||||
## Wait for the prompt and enter `getprime`
|
||||
expect "nsh> "
|
||||
send -s "getprime\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 }
|
||||
"ostest_main: Exiting with status 0" { exit 0 }
|
||||
|
||||
## If timeout, exit with an error
|
||||
timeout { exit 1 }
|
||||
|
|
Loading…
Reference in a new issue