Skip to content

CI: Coverage: Fix: Change the source of component name. #93496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gbarkadiusz
Copy link
Contributor

@gbarkadiusz gbarkadiusz commented Jul 22, 2025

Getting Component Name from Testsuite Name Instead of Testcase Identifier

This pr modifies the way the component name is derived for coverage report generation. Previously, the script extracted the component name from the testcase identifier, assuming it followed the format:

[component.subcomponent]

However, after commit 9219c81 (twister: make no-detailed-test-id default), the level of detail in test identifiers was reduced.

9219c81b66f48523f0cd3b7b7cac8cf3dadb84b2 is the first bad commit
commit 9219c81b66f48523f0cd3b7b7cac8cf3dadb84b2
Author: Anas Nashif <anas.nashif@intel.com>
Date:   Fri Jul 11 11:36:03 2025 -0400

    twister: make no-detailed-test-id default

    Make this option default and reduce amount of details displayed by
    twister.
    This options has been enabled in CI for a while now with the intention
    of making it default.

    Signed-off-by: Anas Nashif <anas.nashif@intel.com>

 .github/workflows/clang.yaml                    | 2 +-
 .github/workflows/twister.yaml                  | 6 +++---
 .github/workflows/twister_tests_blackbox.yml    | 8 ++++----
 scripts/ci/test_plan.py                         | 4 ++--
 scripts/pylib/twister/twisterlib/environment.py | 4 ++--
 scripts/tests/twister/conftest.py               | 1 +
 6 files changed, 13 insertions(+), 12 deletions(-)
root@acholewx-mobl:~/develop/repos/zephyr_upstream#

Example change in identifiers:

Before (detailed):

"identifier": "bluetooth.audio.cap_commander.test_default.cap_commander_test_broadcast_reception.commander_reception_stop_inval_no_subgroups"

After (reduced):

"identifier": "cap_commander_test_broadcast_reception.commander_reception_stop_inval_no_subgroups"

Because of this, the script incorrectly interprets cap_commander_test_broadcast_reception as the component name instead of the correct bluetooth. This leads to the following issue when generating the coverage report:

xlsxwriter.exceptions.InvalidWorksheetName: Excel worksheet name 'cap_commander_test_broadcast_reception' must be <= 31 chars.

(Example failure: GitHub Actions log)

This change updates the logic to derive the component name from the testsuite name rather than testcase identifier, restoring correct component mapping and preventing coverage report generation failures.

Probe run:
https://github.com/zephyrproject-rtos/zephyr/actions/runs/16442311600?pr=93496

Get component name from testsuite name instead of
testcase identifier.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
@gbarkadiusz gbarkadiusz changed the title Topic/coverage testcase identifier [DNM] CI: Coverage: Fix: Change the source of component name. [DNM] Jul 22, 2025
@gbarkadiusz gbarkadiusz force-pushed the topic/coverage_testcase_identifier branch from 408123b to 788e3c1 Compare July 22, 2025 12:07
@gbarkadiusz gbarkadiusz changed the title CI: Coverage: Fix: Change the source of component name. [DNM] CI: Coverage: Fix: Change the source of component name. Jul 22, 2025
@gbarkadiusz gbarkadiusz marked this pull request as ready for review July 22, 2025 12:08
@zephyrbot zephyrbot added area: Continuous Integration size: XS A PR changing only a single line of code labels Jul 22, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Continuous Integration size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants