From 5f887bdf7aa6f9ee15d1b6cc59363cea71178c5d Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 6 Jul 2009 13:31:27 +0000 Subject: * 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 --- tests/libptxdisttest.kermit | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/libptxdisttest.kermit') 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" -- cgit v1.2.3