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

Added zapper-automated testplan to SRU (New) #764

Merged
merged 7 commits into from
Oct 18, 2023
Merged

Added zapper-automated testplan to SRU (New) #764

merged 7 commits into from
Oct 18, 2023

Conversation

p-gentili
Copy link
Collaborator

@p-gentili p-gentili commented Oct 16, 2023

Description

The testplan zapper-enabled-automated includes jobs like USB hotplugging, EDID cycling, etc. and with this PR will be included in our SRU Desktop testplan and in iot-server/core testplans.

Every Zapper job is depending on the so-called Zapper capabilities which are fetched by the zapper-capabilities job. This PR updates this job so that it doesn't fail when ZAPPER_IP is not provided or the Zapper is non responding correctly: by default, every zapper-enabled job will be skipped in that case.

Resolved issues

Resolves ZAP-578

Documentation

  • Changes are only related to Zapper and its inclusion in SRU, not sure we can disclosure much about it in public documentation
  • Changes (and existing code) are now tested with 100% test coverage

Tests

For what concerns zapper-capabilities changes:

Without providing the ZAPPER_IP variable:

checkbox.checkbox-cli run com.canonical.certification::zapper-enabled-automated

will result in

==================================[ Results ]===================================
 ☑ : Get Zapper's setup capabilities
 ☑ : Collect information about installed snap packages
 ☑ : Collect information about hardware devices (udev)
 ☑ : Collect information about installed software packages
 ☑ : bluetooth/detect-output
 ☐ : Check if the system can connect to a Bluetooth speaker using A2DP profile
 ☐ : Check if the system recognizes keyboard events from Zapper
 ☐ : Check if the system automatically changes the resolution based on EDID
 ☑ : Hardware Manifest
 ☐ : Check if the system recognizes hotplug events on HDMI

where zapper-capabilities succeeded but every Zapper job was skipped.

On the other hand, passing ZAPPER_IP will result in:

==================================[ Results ]===================================
 ☑ : Collect information about installed snap packages
 ☑ : Collect information about hardware devices (udev)
 ☑ : Collect information about installed software packages
 ☑ : bluetooth/detect-output
 ☑ : Get Zapper's setup capabilities
 ☑ : Check if the system can connect to a Bluetooth speaker using A2DP profile
 ☑ : Check if the system recognizes keyboard events from Zapper
 ☑ : Check if the system automatically changes the resolution based on EDID
 ☑ : Hardware Manifest
 ☑ : Check if the system recognizes hotplug events on HDMI
 ☑ : Collect information about supported types of USB
 ☑ : Zapper-driven USB 3.0 insertion test on port 1
 ☑ : Zapper-driven USB 3.0 removal test on port 1

where, depending on the Zapper capabilites, some Zapper jobs run.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #764 (43787b8) into main (99b9828) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #764      +/-   ##
==========================================
+ Coverage   34.23%   34.28%   +0.05%     
==========================================
  Files         302      302              
  Lines       34156    34157       +1     
  Branches     5910     5909       -1     
==========================================
+ Hits        11694    11712      +18     
+ Misses      21921    21904      -17     
  Partials      541      541              
Flag Coverage Δ
checkbox-support 49.73% <100.00%> (+0.36%) ⬆️
provider-base 2.49% <ø> (ø)
provider-certification-client 57.14% <ø> (ø)
provider-sru 100.00% <ø> (ø)

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

Files Coverage Δ
...x-support/checkbox_support/scripts/zapper_proxy.py 100.00% <100.00%> (+38.63%) ⬆️

@p-gentili p-gentili marked this pull request as ready for review October 17, 2023 13:48
Copy link
Contributor

@yphus yphus left a comment

Choose a reason for hiding this comment

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

For the record, rpi devices use a different test plan to run sru (client-cert-iot-server-22-04-automated which is based on client-cert-iot-ubuntucore-22-automated).

@p-gentili p-gentili merged commit f867f60 into main Oct 18, 2023
30 checks passed
@p-gentili p-gentili deleted the zapper-sru branch October 18, 2023 07:08
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.

2 participants