diff mbox series

automation: add default QEMU_TIMEOUT value if not already set

Message ID 20240816010034.2199142-1-stefano.stabellini@amd.com (mailing list archive)
State New
Headers show
Series automation: add default QEMU_TIMEOUT value if not already set | expand

Commit Message

Stefano Stabellini Aug. 16, 2024, 1 a.m. UTC
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>
---
 automation/scripts/qemu-key.exp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Michal Orzel Aug. 16, 2024, 7:11 a.m. UTC | #1
On 16/08/2024 03:00, Stefano Stabellini wrote:
> 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>
> ---
>  automation/scripts/qemu-key.exp | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/automation/scripts/qemu-key.exp b/automation/scripts/qemu-key.exp
> index 35eb903a31..787f1f08cb 100755
> --- a/automation/scripts/qemu-key.exp
> +++ b/automation/scripts/qemu-key.exp
> @@ -1,6 +1,10 @@
>  #!/usr/bin/expect -f
>  
> -set timeout $env(QEMU_TIMEOUT)
> +if {[info exists env(QEMU_TIMEOUT)]} {
> +    set timeout $env(QEMU_TIMEOUT)
> +} else {
> +    set timeout 1500
> +}
>  
>  log_file -a $env(QEMU_LOG)
>  

Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal
diff mbox series

Patch

diff --git a/automation/scripts/qemu-key.exp b/automation/scripts/qemu-key.exp
index 35eb903a31..787f1f08cb 100755
--- a/automation/scripts/qemu-key.exp
+++ b/automation/scripts/qemu-key.exp
@@ -1,6 +1,10 @@ 
 #!/usr/bin/expect -f
 
-set timeout $env(QEMU_TIMEOUT)
+if {[info exists env(QEMU_TIMEOUT)]} {
+    set timeout $env(QEMU_TIMEOUT)
+} else {
+    set timeout 1500
+}
 
 log_file -a $env(QEMU_LOG)