mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
The expectation is that QEMU_TIMEOUT should be set as a Gitlab CI/CD variable but if not we should be able to run the pipeline anyway. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
50 lines
746 B
Plaintext
Executable File
50 lines
746 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
|
|
|
if {[info exists env(QEMU_TIMEOUT)]} {
|
|
set timeout $env(QEMU_TIMEOUT)
|
|
} else {
|
|
set timeout 1500
|
|
}
|
|
|
|
log_file -a $env(QEMU_LOG)
|
|
|
|
match_max 10000
|
|
|
|
eval spawn $env(QEMU_CMD)
|
|
|
|
expect_after {
|
|
-re "(.*)\r" {
|
|
exp_continue
|
|
}
|
|
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
|
|
|