diff mbox series

[isar-cip-core,v4,1/2] .gitlab-ci.yml: Set timeout value to run IEC layer tests for different targets.

Message ID 20250417072708.2757909-1-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State New
Headers show
Series [isar-cip-core,v4,1/2] .gitlab-ci.yml: Set timeout value to run IEC layer tests for different targets. | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com April 17, 2025, 7:27 a.m. UTC
From: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>

Signed-off-by: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
---
 .gitlab-ci.yml                   | 6 +++++-
 scripts/submit_lava.sh           | 7 +++++++
 tests/templates/IEC_template.yml | 2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 146eb33..2c1deaa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -334,7 +334,7 @@  build:qemu-riscv64:
   tags:
     - small
   script:
-    - scripts/submit_lava.sh ${test_function} ${target} ${CI_COMMIT_SHORT_SHA} ${release} ${CI_COMMIT_REF_SLUG}
+    - scripts/submit_lava.sh ${test_function} ${target} ${CI_COMMIT_SHORT_SHA} ${release} ${CI_COMMIT_REF_SLUG} ${iec_test_timeout}
   artifacts:
     name: "$CI_JOB_NAME"
     when: always
@@ -431,6 +431,7 @@  test:qemu-amd64-IEC:
   variables:
     target: qemu-amd64
     test_function: IEC
+    iec_test_timeout: 40
 
 test:qemu-arm64-IEC:
   extends:
@@ -439,6 +440,7 @@  test:qemu-arm64-IEC:
   variables:
     target: qemu-arm64
     test_function: IEC
+    iec_test_timeout: 40
 
 test:qemu-arm-IEC:
   extends:
@@ -447,6 +449,7 @@  test:qemu-arm-IEC:
   variables:
     target: qemu-arm
     test_function: IEC
+    iec_test_timeout: 40
 
 test:x86-uefi-IEC:
   extends:
@@ -455,6 +458,7 @@  test:x86-uefi-IEC:
   variables:
     target: x86-uefi
     test_function: IEC
+    iec_test_timeout: 60
 
 test:qemu-amd64-secure-boot-unsigned-kernel:
   extends:
diff --git a/scripts/submit_lava.sh b/scripts/submit_lava.sh
index 9da083a..f69eadb 100755
--- a/scripts/submit_lava.sh
+++ b/scripts/submit_lava.sh
@@ -24,6 +24,10 @@  TARGET=$2
 COMMIT_REF=$3
 RELEASE=$4
 COMMIT_BRANCH=$5
+IEC_TEST_TIMEOUT_MINUTES=$6
+
+# Export to replace the timeout variable declared in IEC template
+export IEC_TEST_TIMEOUT_MINUTES
 
 if [ -z "$SUBMIT_ONLY" ]; then SUBMIT_ONLY=false; fi
 
@@ -334,6 +338,9 @@  else
 	exit 1
 fi
 
+# Replace the IEC_TEST_TIMEOUT_MINUTES variable in template files
+envsubst < ${job_dir}/*.yml > template.tmp && mv template.tmp ${job_dir}/*.yml
+
 if ! validate_job; then
 	clean_up
 	exit 1
diff --git a/tests/templates/IEC_template.yml b/tests/templates/IEC_template.yml
index 92944da..c8efe40 100644
--- a/tests/templates/IEC_template.yml
+++ b/tests/templates/IEC_template.yml
@@ -60,7 +60,7 @@  actions:
 # TEST_BLOCK
 - test:
      timeout:
-       minutes: 40
+       minutes: ${IEC_TEST_TIMEOUT_MINUTES}
      definitions:
      - repository: https://gitlab.com/cip-project/cip-testing/cip-security-tests.git
        from: git