diff options
-rw-r--r-- | tests/libptxdisttest.kermit | 12 | ||||
-rwxr-xr-x | tests/setenv.kermit | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/libptxdisttest.kermit b/tests/libptxdisttest.kermit index 02d498fd7..b139f90af 100644 --- a/tests/libptxdisttest.kermit +++ b/tests/libptxdisttest.kermit @@ -73,6 +73,12 @@ define ptx_wait_string { ptx_check_fail "waiting for '\%2'" } +# Output something and sync to itself being output +define ptx_lineout { + lineout \%1 + input 5 \%1 +} + define ptx_uboot_enter_shell { ptx_test_start "Logging into U-Boot" @@ -96,14 +102,12 @@ define ptx_uboot_enter_shell { define ptx_uboot_exec { - lineout "\%2" - # Wait for the command itself to sync to input buffer - input 10 \%2 + ptx_lineout "\%2" input \%1 \m(uboot_prompt) ptx_check_fail "timeout while waiting for u-boot prompt after '\%2'" if = \m(uboot_version) 2 { - lineout "echo result: $?" + ptx_lineout "echo result: $?" input 10 \fpattern(result: 0$) ptx_check_fail "returncode from '\%2' is not 0" diff --git a/tests/setenv.kermit b/tests/setenv.kermit index 84af52321..3d2de9f9d 100755 --- a/tests/setenv.kermit +++ b/tests/setenv.kermit @@ -7,7 +7,7 @@ define setenv_uboot_v1 { ptx_check_fail "Could not open \%2." clear input - lineout "printenv" + ptx_lineout "printenv" declare \&c[1000] # array with entries to skip @@ -66,7 +66,7 @@ define setenv_uboot_v2 { ptx_uboot_exec 3 "eth0.netmask=\m(PTXCONF_BOARDSETUP_NETMASK)" ptx_test_end - ptx_test_start "Getting default environment" + ptx_test_start "Getting default environment" ptx_uboot_exec 15 "ping $eth0.serverip" ptx_uboot_exec 15 "tftp \m(imagename)" ptx_test_end @@ -78,7 +78,7 @@ define setenv_uboot_v2 { ptx_test_end ptx_uboot_exec_single "Reloading new environment" 10 "loadenv" - + ptx_test_start "Restoring MAC address" ptx_uboot_exec 5 "echo -a /env/config eth0.ethaddr=$eth0.ethaddr" ptx_uboot_exec 10 "saveenv" |