Skip to content
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

Fix touchscreen tests on ARM64 via remote (bugfix) #1528

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Oct 3, 2024

Description

When running the touchscreen tests via remote, the user is promted to rotate the rectangle on a window but the user-interact-verify job (silently) fails to start the window at all. When the stderr is un-silenced, the following error is printed in the console:

file:///snap/checkboxXX/[...]/touch_zoom_test.qml:74 Timer is not a type

Timer is a builtin type of QT and this happens for any other type (removing the timer just makes it fail on the next builtin type).

After much investigation, and thanks to the reported fact that the test starts fine if launched from the checkbox.shell or locally, I found that the problem is the missing envvar in this PR. This fixes the propagation of the envvar. I have whitelisted it instead of explicitly requiring it in the test because I believe that one doesn't have to understand exactly how QT works when writing a test, so they don't need to reason about which QT envvars are needed.

Resolved issues

Fixes: CHECKBOX-1511
Fixes: #1371

Documentation

N/A

Tests

I have built and ran the test via remote with the following launcher. The window now shows up even via remote when before it did not.

    #!/usr/bin/env checkbox-cli
    [launcher]
    launcher_version = 1
    stock_reports = text
    [test plan]
    unit = com.canonical.certification::touchscreen-cert-manual
    forced = yes
    [test selection]
    forced=yes
    exclude=com.canonical.certification::touchscreen/drag-n-drop
    match = com.canonical.certification::touchscreen/multitouch-rotate
    [manifest]
    com.canonical.certification::has_touchscreen=yes

To test it yourself use this checkbox24 snap, built from this branch (or build it yourself on arm64):

  1. Install the snap
  2. Install the frontend
  3. Run remote with the above launcher
  4. Press Return
  5. A window with a blue rectangle should show up on the DUT

Note: This is a core24 runtime snap. Remember CheckboxXX core only work on the XX version (so this doesn't work on jammy, only noble), if you want to test it on jammy I can build a core22 snap for you, just let me know

@Hook25 Hook25 changed the title Fix touchscreen tests on ARM64 via remote Fix touchscreen tests on ARM64 via remote (bugfix) Oct 3, 2024
@Hook25
Copy link
Collaborator Author

Hook25 commented Oct 4, 2024

Proof of this working on the original hardware in the lab:
image

Copy link
Contributor

@baconYao baconYao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! LGTM +1

@Hook25 Hook25 merged commit 71be2c0 into main Oct 11, 2024
48 of 50 checks passed
@Hook25 Hook25 deleted the fix_touchscreen_arm branch October 11, 2024 07:34
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.56%. Comparing base (17ceef1) to head (5a432d2).
Report is 103 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1528   +/-   ##
=======================================
  Coverage   47.56%   47.56%           
=======================================
  Files         369      369           
  Lines       39596    39596           
  Branches     6691     6691           
=======================================
  Hits        18833    18833           
  Misses      20051    20051           
  Partials      712      712           
Flag Coverage Δ
checkbox-ng 68.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message "Timer is not a type" be got while executing QT related cases through control (remote) by using snap
2 participants