diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2f831a308a1ffd0befc889320a17d9e235b830b3..0e77bbba0d2c701cdb8f2ea838a8fdb6f69beae4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -125,8 +125,9 @@ lava-linux-avenger96:
   stage: test
   extends: .lava-test
   variables:
-    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/avenger96-acts.yaml"
+    MACHINE: stm32mp1-av96
     CI_BUILD_JOB_NAME: linux-stm32mp1-av96
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/avenger96-acts.yaml"
     CI_REPORT_JOB_NAME: lava-report
   rules:
     - when: never
@@ -136,8 +137,9 @@ lava-qemu-x86:
   stage: test
   extends: .lava-test
   variables:
-    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86.yaml"
+    MACHINE: qemux86
     CI_BUILD_JOB_NAME: linux-qemu-x86
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86_64:
@@ -145,8 +147,9 @@ lava-qemu-x86_64:
   stage: test
   extends: .lava-test
   variables:
-    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64.yaml"
+    MACHINE: qemux86-64
     CI_BUILD_JOB_NAME: linux-qemu-x86_64
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-zephyr-96b-nitrogen-tests:
@@ -154,8 +157,9 @@ lava-zephyr-96b-nitrogen-tests:
   stage: test
   extends: .lava-test
   variables:
-    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/nitrogen-test.yaml"
+    MACHINE: 96b-nitrogen
     CI_BUILD_JOB_NAME: zephyr-96b-nitrogen-tests
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/nitrogen-test.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-zephyr-qemu-cortex-m3:
@@ -163,8 +167,9 @@ lava-zephyr-qemu-cortex-m3:
   stage: test
   extends: .lava-test
   variables:
-    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-zephyr-cortex-m3.yaml"
+    MACHINE: qemu-cortex-m3
     CI_BUILD_JOB_NAME: zephyr-qemu-cortex-m3
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-zephyr-cortex-m3.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-zephyr-qemu-x86:
@@ -172,8 +177,9 @@ lava-zephyr-qemu-x86:
   stage: test
   extends: .lava-test
   variables:
-    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-zephyr-x86.yaml"
+    MACHINE: qemu-x86
     CI_BUILD_JOB_NAME: zephyr-qemu-x86
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-zephyr-x86.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-report:
diff --git a/.oniro-ci/test-generic.yaml b/.oniro-ci/test-generic.yaml
index 1fa08b71e2c9127e0d1062108fa2b802cba36409..59bf0c2ee8e828770b2a96dc7861c7aa0f9f08ba 100644
--- a/.oniro-ci/test-generic.yaml
+++ b/.oniro-ci/test-generic.yaml
@@ -16,12 +16,15 @@
         echo "precondition failed - please disable the child job if CI_LAVA_TOKEN not set in gitlab CI/CD variables"
         && exit 1 )
     # Check if the job is configured properly.
-    - test -n "$CI_LAVA_JOB_DEFINITION" || (
-        echo "precondition failed - set CI_LAVA_JOB_DEFINITION to the URL of the LAVA test job definition"
+    - test -n "$MACHINE" || (
+        echo "precondition failed - set MACHINE to the name of the target device for which the image is built"
         && exit 1 )
     - test -n "$CI_BUILD_JOB_NAME" || (
         echo "precondition failed - set CI_BUILD_JOB_NAME to the appropriate job name from which LAVA will pick up build artifact"
         && exit 1 )
+    - test -n "$CI_LAVA_JOB_DEFINITION" || (
+        echo "precondition failed - set CI_LAVA_JOB_DEFINITION to the URL of the LAVA test job definition"
+        && exit 1 )
     - test -n "$CI_REPORT_JOB_NAME" || (
         echo "precondition failed - set CI_REPORT_JOB_NAME to the CI job name which will gather results back from LAVA"
         && exit 1 )
@@ -44,7 +47,7 @@
     - |
       rm -rf lava_jobs && mkdir lava_jobs
       if echo "${CI_BUILD_JOB_NAME}" | grep -i "zephyr"; then
-        for image in $(find artifacts/ -name "*.elf" -exec basename {} \;); do
+        for image in $(find artifacts/images/${MACHINE} -name "*.elf" -exec basename {} \;); do
           job_name=$(basename "${image}" ".elf")
           echo "--- Generating lava job definition ${job_name}.yaml ---"
           sed "s/\$elf_file/$image/" job_def.yaml | tee lava_jobs/"${job_name}".yaml