canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
30 stars 44 forks source link

Fix `id: graphics/{index}_gl_support_{product_slug}` alway return ture (New) #1247

Closed hanhsuan closed 1 month ago

hanhsuan commented 1 month ago

Description

This PR is going to create a python script to fix id: graphics/{index}_gl_support_{product_slug} issue as describing in https://github.com/canonical/checkbox/issues/1122.

The job and test plan will be addressed in another PR.

Resolved issues

The command used in id: graphics/{index}_gl_support_{product_slug}

"$CHECKBOX_RUNTIME"/usr/lib/nux/unity_support_test -p 2>&1 | sed -e "s/\x1b\[[0-9;]*m//g"

will always return true to make this test always pass.

Documentation

Tests

Unit test

If you would like to make the renderer to be changed to llvmpipe while testing, you could use following command to test.

LIBGL_ALWAYS_SOFTWARE=1 python3 gl_support.py
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 43.53%. Comparing base (ba754d6) to head (36e416c). Report is 13 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1247 +/- ## ========================================== + Coverage 43.37% 43.53% +0.15% ========================================== Files 357 358 +1 Lines 38693 38722 +29 Branches 6561 6565 +4 ========================================== + Hits 16784 16857 +73 + Misses 21245 21200 -45 - Partials 664 665 +1 ``` | [Flag](https://app.codecov.io/gh/canonical/checkbox/pull/1247/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | Coverage Δ | | |---|---|---| | [provider-base](https://app.codecov.io/gh/canonical/checkbox/pull/1247/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `17.21% <100.00%> (+0.44%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.