mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Fixes: 95764a0817 (automation: update xilinx test scripts (tty))
This patch introduced a CI failure due to a timeout in xilinx-x86_64 test.
Change xilinx-x86_64 and xilinx-arm64 scripts to use "expect" utility
to determine test result and allow early exit from tests.
Add "expect" to xilinx container environment (dockerfile).
Rename references to "QEMU" in "qemu-key.exp" expect script to "TEST" to be
used by both QEMU and hardware tests.
Signed-off-by: Victor Lira <victorm.lira@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
50 lines
762 B
Plaintext
Executable File
50 lines
762 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
|
|
|
if {[info exists env(TEST_TIMEOUT)]} {
|
|
set timeout $env(TEST_TIMEOUT)
|
|
} else {
|
|
set timeout 1500
|
|
}
|
|
|
|
log_file -a $env(TEST_LOG)
|
|
|
|
match_max 10000
|
|
|
|
eval spawn $env(TEST_CMD)
|
|
|
|
expect_after {
|
|
-re "(.*)\r" {
|
|
exp_continue -continue_timer
|
|
}
|
|
timeout {send_error "ERROR-Timeout!\n"; exit 1}
|
|
eof {send_error "ERROR-EOF!\n"; exit 1}
|
|
}
|
|
|
|
if {[info exists env(UBOOT_CMD)]} {
|
|
expect "=>"
|
|
|
|
send "$env(UBOOT_CMD)\r"
|
|
}
|
|
|
|
if {[info exists env(LOG_MSG)]} {
|
|
expect {
|
|
"$env(PASSED)" {
|
|
expect "$env(LOG_MSG)"
|
|
exit 0
|
|
}
|
|
"$env(LOG_MSG)" {
|
|
expect "$env(PASSED)"
|
|
exit 0
|
|
}
|
|
}
|
|
}
|
|
|
|
expect {
|
|
"$env(PASSED)" {
|
|
exit 0
|
|
}
|
|
}
|
|
|
|
expect eof
|
|
|