summaryrefslogtreecommitdiff
path: root/test/cmd_repeat.sh
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-14 18:40:17 (GMT)
committerTom Rini <trini@ti.com>2014-09-24 22:30:28 (GMT)
commit129acd4c75f85bdb7f1267fe5f1187e0fc37d221 (patch)
tree22704082d8bddd23eb5ddcc4e42fc53e6b036722 /test/cmd_repeat.sh
parent07b342783a11bc56c38207006b5ad9d70ca3c863 (diff)
downloadu-boot-129acd4c75f85bdb7f1267fe5f1187e0fc37d221.tar.xz
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 0000000..990e799
--- /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"