From 6c538c9ce255cd6b55d9db5fc07b64823823e11a Mon Sep 17 00:00:00 2001 From: Lup Yuen Lee Date: Thu, 25 Jan 2024 06:59:30 +0800 Subject: [PATCH] Create nuttx.exp --- nuttx.exp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nuttx.exp diff --git a/nuttx.exp b/nuttx.exp new file mode 100644 index 0000000..4d709bb --- /dev/null +++ b/nuttx.exp @@ -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 } +}