Skip to content

Commit a07d0e6

Browse files
committed
testcases: Make camera postprocessing conditional on camera testplan
Apply camera-specific CDT replacement only when running camera tests on rb3gen2-core-kit to prevent unnecessary postprocessing overhead on non-camera test cases. This allows boot, audio, and other validation tests to run efficiently without camera-specific image modifications while ensuring camera tests receive proper vision kit CDT configuration for rb3gen2-core-kit target. Signed-off-by: Anil Yadav <anilyada@qti.qualcomm.com>
1 parent c708b8f commit a07d0e6

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

lava_test_plans/devices/rb3gen2-core-kit

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
{% set BOOT_OS_PROMPT = BOOT_OS_PROMPT|default("root@rb3gen2-core-kit") %}
55
{% set ROOTFS_URL_COMP = ROOTFS_URL_COMP|default("gz") %}
66

7+
{# Camera-specific postprocess steps - only applied when ENABLE_CAMERA_POSTPROCESS is true #}
8+
{% if ENABLE_CAMERA_POSTPROCESS is defined and ENABLE_CAMERA_POSTPROCESS %}
9+
{% set ADDITIONAL_POSTPROCESS_STEPS = [
10+
'tar xvf qcom-multimedia-image-rb3gen2-core-kit.rootfs.qcomflash.tar.gz',
11+
'cp qcom-multimedia-image-rb3gen2-core-kit/cdt_vision_kit.bin qcom-multimedia-image-rb3gen2-core-kit/cdt.bin',
12+
'tar czvf qcom-multimedia-image-rb3gen2-core-kit.rootfs.qcomflash.tar.gz qcom-multimedia-image-rb3gen2-core-kit/'
13+
] %}
14+
{% endif %}
15+
716
{% set rootfs_label = 'rootfs' %}
817

918
{% block device_type %}rb3gen2-core-kit{% endblock %}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{% extends "testcases/templates/master.jinja2" %}
2+
3+
{% set test_name = test_name | default("pre-merge-camera") %}
4+
{% set test_timeout = 5 %}
5+
6+
{# Get excluded tests list from device file #}
7+
{% set EXCLUDED_TESTS = EXCLUDED_TESTS|default([]) %}
8+
9+
{# Camera job metadata only #}
10+
{% set TAGS = (TAGS | default([])) + ["has-camera"] %}
11+
12+
{# Enable camera-specific postprocessing for devices that need it #}
13+
{% set ENABLE_CAMERA_POSTPROCESS = true %}
14+
15+
{# Define all tests with their details and pre-evaluate conditions #}
16+
{% set all_tests = [
17+
{"name": "Libcamera_cam", "path": "Runner/suites/Multimedia/Camera/Libcamera_cam/Libcamera_cam.yaml", "expected": ["Libcamera_cam"]},
18+
{"name": "Camera_RDI_FrameCapture", "path": "Runner/suites/Multimedia/Camera/Camera_RDI_FrameCapture/Camera_RDI_FrameCapture.yaml", "expected": ["Camera_RDI_FrameCapture"]}
19+
] %}
20+
21+
22+
{% block test_target %}
23+
{% for test in all_tests %}
24+
{% if (test.name not in EXCLUDED_TESTS) and (test.include|default(true)) %}
25+
{{ super() }}
26+
{# include the super block once if any tests are included #}
27+
{% break %}
28+
{% endif %}
29+
{% endfor %}
30+
{% for test in all_tests %}
31+
{# Check if test should be included (not excluded AND condition met if specified) #}
32+
{% if (test.name not in EXCLUDED_TESTS) and (test.include|default(true)) %}
33+
- from: git
34+
name: "{{ test.name }}"
35+
path: {{ test.path }}
36+
repository: {{ TEST_DEFINITIONS_REPOSITORY }}
37+
{% if test.params is defined %}
38+
params:
39+
{% for param_key, param_value in test.params.items() %}
40+
{{ param_key }}: "{{ param_value }}"
41+
{% endfor %}
42+
{% endif %}
43+
{% if test.expected is defined and test.expected %}
44+
expected:
45+
{% for expected in test.expected|default([]) %}
46+
- {{ expected }}
47+
{% endfor %}
48+
{% endif %}
49+
{% endif %}
50+
{% endfor %}
51+
{% endblock test_target %}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../testcases/pre-merge-camera.yaml

0 commit comments

Comments
 (0)