summaryrefslogtreecommitdiffstats
path: root/test/cmd_repeat.sh
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-14 12:40:17 -0600
committerTom Rini <trini@ti.com>2014-09-24 18:30:28 -0400
commit129acd4c75f85bdb7f1267fe5f1187e0fc37d221 (patch)
tree22704082d8bddd23eb5ddcc4e42fc53e6b036722 /test/cmd_repeat.sh
parent07b342783a11bc56c38207006b5ad9d70ca3c863 (diff)
downloadtalos-obmc-uboot-129acd4c75f85bdb7f1267fe5f1187e0fc37d221.tar.gz
talos-obmc-uboot-129acd4c75f85bdb7f1267fe5f1187e0fc37d221.zip
test: Add a test for command repeat
This performs a command, then repeats it, and checks that the repeat happens. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd_repeat.sh')
-rwxr-xr-xtest/cmd_repeat.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/cmd_repeat.sh b/test/cmd_repeat.sh
new file mode 100755
index 0000000000..990e79900f
--- /dev/null
+++ b/test/cmd_repeat.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Test for U-Boot cli including command repeat
+
+BASE="$(dirname $0)"
+. $BASE/common.sh
+
+run_test() {
+ ./${OUTPUT_DIR}/u-boot <<END
+setenv ctrlc_ignore y
+md 0
+
+reset
+END
+}
+check_results() {
+ echo "Check results"
+
+ grep -q 00000100 ${tmp} || fail "Command did not repeat"
+}
+
+echo "Test CLI repeat"
+echo
+tmp="$(tempfile)"
+build_uboot
+run_test >${tmp}
+check_results ${tmp}
+rm ${tmp}
+echo "Test passed"
OpenPOWER on IntegriCloud