From: Stephen Warren <[email protected]>

This moves this test into the new infra-structure, and also allows it to
work on real hardware, not just sandbox.

Signed-off-by: Stephen Warren <[email protected]>
---
 test/cmd_repeat.sh | 29 -----------------------------
 test/py/test_md.py | 10 ++++++++++
 2 files changed, 10 insertions(+), 29 deletions(-)
 delete mode 100755 test/cmd_repeat.sh

diff --git a/test/cmd_repeat.sh b/test/cmd_repeat.sh
deleted file mode 100755
index 990e79900f47..000000000000
--- a/test/cmd_repeat.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/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"
diff --git a/test/py/test_md.py b/test/py/test_md.py
index 49cdd2685234..9667fd4f2217 100644
--- a/test/py/test_md.py
+++ b/test/py/test_md.py
@@ -10,3 +10,13 @@ def test_md(uboot_console):
     uboot_console.run_command("mw " + addr + " " + val)
     response = uboot_console.run_command("md " + addr + " 10")
     assert(expected_response in response)
+
[email protected]("cmd_memory")
+def test_md_repeat(uboot_console):
+    addr_base = "%08x" % uboot_console.config.ram_base
+    words = 0x10
+    addr_repeat = "%08x" % (uboot_console.config.ram_base + (words * 4))
+    uboot_console.run_command("md %s %x" % (addr_base, words))
+    response = uboot_console.run_command("")
+    expected_response = addr_repeat + ": "
+    assert(expected_response in response)
-- 
1.9.1

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to