canonical / checkbox

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

Carry over all QT variables in child process (BugFix) #1281

Closed Hook25 closed 3 months ago

Hook25 commented 3 months ago

Description

Checkbox Remote, when running from a snap, is unable to start any QT window. This is because, although the environment variables are set in the wrapper, they are not explicitly propagated to the subshell nor requested by the jobs (as they are not explicitly necessary in a non-snapped scenario).

This introduces a few new exceptions to the environment preparation funciton so that it propagates QT-related environment variables to the sub shell.

Minor: this also propagates the debug plugin environment variable that is unset most of the times, but it is handy to debug what is going wrong with the setup if anything

Resolved issues

Fixes: CHECKBOX-1325 Fixes: https://github.com/canonical/checkbox/issues/728

Documentation

N/A

Tests

This by re-building the snap and selecting the touchscreen testplan. If the touchscreen testing window pops up, then the test is fixed.

Pre-built snap: https://drive.google.com/file/d/1Zf1L5qpk_YHvqykAj2h0EH0E0IdhiWHM/view?usp=sharing

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 44.10%. Comparing base (76939c4) to head (f3844d4). Report is 114 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1281 +/- ## ======================================= Coverage 44.10% 44.10% ======================================= Files 358 358 Lines 38765 38765 Branches 6571 6571 ======================================= Hits 17096 17096 Misses 21006 21006 Partials 663 663 ``` | [Flag](https://app.codecov.io/gh/canonical/checkbox/pull/1281/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | Coverage Δ | | |---|---|---| | [checkbox-ng](https://app.codecov.io/gh/canonical/checkbox/pull/1281/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `67.54% <ø> (ø)` | | 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.

baconYao commented 3 months ago

Hi @Hook25, I've tried the edge checkbox (checkbox control) on 202405-34024 device but is still malfunction. No QT window be shown on screen.

checkbox                   4.0.0-dev329      7644   22.04/edge       ce-certification-qa  classic
checkbox22                 4.0.0-dev329      1005   latest/edge      ce-certification-qa  -
fernando79513 commented 2 months ago

Hello @baconYao. I tried it using checkbox control with two different computers and the qt window was shown on the screen when installing checkbox from the PPA.

checkbox 4.0.1.dev2

Also using the checkbox snap:

checkbox            4.0.1-dev2          7738   22.04/edge       ce-certification-qa  classic
checkbox22          4.0.1-dev2          1013   latest/edge      ce-certification-qa  -

All the images were showed for the touchscreen and touchpad tests.

Any Idea of other approaches to reproduce your issue?