summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2009-07-06 13:31:27 +0000
committerWolfram Sang <w.sang@pengutronix.de>2009-07-06 13:31:27 +0000
commit5f887bdf7aa6f9ee15d1b6cc59363cea71178c5d (patch)
treebf3c88cc6943b5719f437570a2338a0857aaf091 /tests
parentc52ea970bb2ebd5ac762c5a668831d5e32434f39 (diff)
downloadptxdist-5f887bdf7aa6f9ee15d1b6cc59363cea71178c5d.tar.gz
ptxdist-5f887bdf7aa6f9ee15d1b6cc59363cea71178c5d.tar.xz
* libptxdist.kermit: add simple exec-routine for userland
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@10944 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'tests')
-rw-r--r--tests/libptxdisttest.kermit16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/libptxdisttest.kermit b/tests/libptxdisttest.kermit
index f056b9f9b..66c0a9282 100644
--- a/tests/libptxdisttest.kermit
+++ b/tests/libptxdisttest.kermit
@@ -47,6 +47,7 @@ define ptx_init {
# Mark as unset
.uboot_version = 0
+ .root_prompt = "root@"
ptx_print "==============================="
ptx_print "Please power on your board now!"
@@ -127,6 +128,21 @@ define ptx_uboot_exec {
}
}
+define ptx_root_exec {
+ # %1 = timeout value, %2 = command, %3 = extra string to wait for (optional)
+
+ ptx_lineout "\%2"
+ if not equal "\%3" "" ptx_wait_string "\%1" "\%3"
+ input \%1 \m(root_prompt)
+ ptx_check_fail "timeout while waiting for root prompt after '\%2'"
+
+ ptx_lineout "echo result: $?:"
+ input 10 "result: 0:"
+ ptx_check_fail "returncode from '\%2' is not 0"
+
+ input 10 \m(root_prompt)
+}
+
define ptx_uboot_exec_single {
ptx_test_start "\%1"