From c05f0d17a630804f49c325e63c5bfd2999d3019c Mon Sep 17 00:00:00 2001 From: Anil Yadav Date: Fri, 13 Feb 2026 18:26:14 +0530 Subject: [PATCH] testcases: Refactor BT suite and add display-gfx test plan Refactor pre-merge-bt to use loop-based test definitions with device exclusion support. Add pre-merge-display-gfx suite for display/graphics validation (core_auth, KMSCube, weston-simple-egl) with same exclusion framework. Signed-off-by: Anil Yadav --- lava_test_plans/testcases/pre-merge-bt.yaml | 31 ++++++++++++---- .../testcases/pre-merge-dispaly-gfx.yaml | 35 +++++++++++++++++++ .../pre-merge/pre-merge-dispaly-gfx.yaml | 1 + 3 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 lava_test_plans/testcases/pre-merge-dispaly-gfx.yaml create mode 100644 lava_test_plans/testplans/meta-qcom/qcom-distro/pre-merge/pre-merge-dispaly-gfx.yaml diff --git a/lava_test_plans/testcases/pre-merge-bt.yaml b/lava_test_plans/testcases/pre-merge-bt.yaml index 24bb5294..c07fb5b8 100644 --- a/lava_test_plans/testcases/pre-merge-bt.yaml +++ b/lava_test_plans/testcases/pre-merge-bt.yaml @@ -3,19 +3,36 @@ {% set test_name = test_name | default("pre-merge-bt") %} {% set test_timeout = 30 %} +{# Get excluded tests list from device file #} +{% set EXCLUDED_TESTS = EXCLUDED_TESTS|default([]) %} + {# Conditional tags based on device type #} {% if device_type == "iq-9075-evk" %} {% set TAGS = ["pvt"] %} {% endif %} +{# Define all tests with their details and pre-evaluate conditions #} +{% set all_tests = [ + {"name": "BT_FW_KMD_Service", "path": "Runner/suites/Connectivity/Bluetooth/BT_FW_KMD_Service/BT_FW_KMD_Service.yaml"}, + {"name": "BT_SCAN", "path": "Runner/suites/Connectivity/Bluetooth/BT_SCAN/BT_SCAN.yaml"} +] %} + + {% block test_target %} {{ super() }} + {% for test in all_tests %} + {# Check if test should be included (not excluded AND condition met if specified) #} + {% if (test.name not in EXCLUDED_TESTS) and (test.include|default(true)) %} - from: git - name: "BT_FW_KMD_Service" - path: Runner/suites/Connectivity/Bluetooth/BT_FW_KMD_Service/BT_FW_KMD_Service.yaml - repository: {{ TEST_DEFINITIONS_REPOSITORY }} - - from: git - name: "BT_SCAN" - path: Runner/suites/Connectivity/Bluetooth/BT_SCAN/BT_SCAN.yaml + name: "{{ test.name }}" + path: {{ test.path }} repository: {{ TEST_DEFINITIONS_REPOSITORY }} -{% endblock test_target %} + {% if test.params is defined %} + params: + {% for param_key, param_value in test.params.items() %} + {{ param_key }}: "{{ param_value }}" + {% endfor %} + {% endif %} + {% endif %} + {% endfor %} +{% endblock test_target %} \ No newline at end of file diff --git a/lava_test_plans/testcases/pre-merge-dispaly-gfx.yaml b/lava_test_plans/testcases/pre-merge-dispaly-gfx.yaml new file mode 100644 index 00000000..89f81f53 --- /dev/null +++ b/lava_test_plans/testcases/pre-merge-dispaly-gfx.yaml @@ -0,0 +1,35 @@ +{% extends "testcases/templates/master.jinja2" %} + +{% set test_name = test_name | default("pre-merge-display-gfx") %} +{% set test_timeout = 30 %} + +{# Get excluded tests list from device file #} +{% set EXCLUDED_TESTS = EXCLUDED_TESTS|default([]) %} + +{% set TAGS = ["display"] %} + +{# Define all tests with their details and pre-evaluate conditions #} +{% set all_tests = [ + {"name": "core_auth", "path": "Runner/suites/Multimedia/Display/igt-gpu-tools/core_auth/core_auth.yaml"}, + {"name": "KMSCube", "path": "Runner/suites/Multimedia/Graphics/KMSCube/KMSCube.yaml"}, + {"name": "weston-simple-egl", "path": "Runner/suites/Multimedia/Graphics/weston-simple-egl/weston-simple-egl.yaml"}, +] %} + +{% block test_target %} + {{ super() }} + {% for test in all_tests %} + {# Check if test should be included (not excluded AND condition met if specified) #} + {% if (test.name not in EXCLUDED_TESTS) and (test.include|default(true)) %} + - from: git + name: "{{ test.name }}" + path: {{ test.path }} + repository: {{ TEST_DEFINITIONS_REPOSITORY }} + {% if test.params is defined %} + params: + {% for param_key, param_value in test.params.items() %} + {{ param_key }}: "{{ param_value }}" + {% endfor %} + {% endif %} + {% endif %} + {% endfor %} +{% endblock test_target %} \ No newline at end of file diff --git a/lava_test_plans/testplans/meta-qcom/qcom-distro/pre-merge/pre-merge-dispaly-gfx.yaml b/lava_test_plans/testplans/meta-qcom/qcom-distro/pre-merge/pre-merge-dispaly-gfx.yaml new file mode 100644 index 00000000..cea61b86 --- /dev/null +++ b/lava_test_plans/testplans/meta-qcom/qcom-distro/pre-merge/pre-merge-dispaly-gfx.yaml @@ -0,0 +1 @@ +../../../../testcases/pre-merge-display-gfx.yaml \ No newline at end of file