summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLuotao Fu <l.fu@pengutronix.de>2010-02-24 10:59:56 +0100
committerLuotao Fu <l.fu@pengutronix.de>2010-02-24 10:59:59 +0100
commitaeb799d556ba3c4b9ef45fc23af204312899db64 (patch)
tree68d6be75d4fb3a1399ca45eb5ac716e25cff5194 /tests
parent110cea32cb71e7471b3469715a05d5b99f3942ab (diff)
downloadptxdist-aeb799d556ba3c4b9ef45fc23af204312899db64.tar.gz
ptxdist-aeb799d556ba3c4b9ef45fc23af204312899db64.tar.xz
[ptxdist] fix bootloader signature matching
The bootloader signature mapping does noet get along with barebox and had a off-by-one error. Also change the output text from "U-Boot" to more generic "Bootloader" to avoid confusion. Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/libptxdisttest.kermit27
1 files changed, 18 insertions, 9 deletions
diff --git a/tests/libptxdisttest.kermit b/tests/libptxdisttest.kermit
index 66c0a9282..84bfcbb26 100644
--- a/tests/libptxdisttest.kermit
+++ b/tests/libptxdisttest.kermit
@@ -90,25 +90,34 @@ define ptx_lineout {
define ptx_uboot_enter_shell {
- ptx_test_start "Logging into U-Boot"
+ ptx_test_start "Logging into Bootloader"
# Determine U-Boot version; 20yy.m is treated as V1.
# tried to match all V1 signatures with \fpattern, failed badly :(
- minput 120 "U-Boot 1." "U-Boot 2." "U-Boot 20"
+ minput 120 "U-Boot 1." "U-Boot 20" "U-Boot 2." "barebox 2"
:eval_again
- ptx_check_fail "waiting for u-boot-signature"
+ ptx_check_fail "waiting for bootloader signature"
lineout
- if = \v(minput) 2 {
- .uboot_prompt = "uboot:"
- .uboot_version = 2
- } else {
+
+ switch \v(minput) {
+ :1
+ :2
.uboot_prompt = "uboot>"
.uboot_version = 1
+ break
+ :3
+ .uboot_prompt = "uboot:"
+ .uboot_version = 2
+ break
+ :4
+ .uboot_prompt = "barebox:"
+ .uboot_version = 2
+ break
}
# sometimes there are caches for serial inputs containing old data
# make sure we act on the newest one
- minput 120 "U-Boot 1." "U-Boot 2." "U-Boot 20" \m(uboot_prompt)
- if not = \v(minput) 4 goto eval_again
+ minput 120 "U-Boot 1." "U-Boot 20" "U-Boot 2." "barebox 2" \m(uboot_prompt)
+ if not = \v(minput) 5 goto eval_again
ptx_test_end
}