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

Included firmware revision and hw revision for wwan resource job (Bugfix) #1168

Merged
merged 5 commits into from
May 30, 2024

Conversation

stanley31huang
Copy link
Collaborator

Description

We would like to collect the firmware revision and hardware revision in the wwan resource job, so we could have the enough information to identify any regression issues related WWAN device.

Resolved issues

N/A

Documentation

N/A

Tests

Tested on one x86 platform running server image

u@u-Alder-Lake-Client-Platform:~$ checkbox-iiotg-classic.checkbox-cli run com.canonical.certification::wwan_resource
$PROVIDERPATH is defined, so following provider sources are ignored ['/snap/checkbox-iiotg-classic/79/providers/checkbox-provider-intliotg', '/home/u/.local/share/plainbox-providers-1', '/var/tmp/checkbox-providers-develop'] 
Using sideloaded provider: checkbox-provider-base, version 4.0.0.dev194 from /var/tmp/checkbox-providers/base
===========================[ Running Selected Jobs ]============================
==============[ Running job 1 / 1. Estimated time left: 0:00:03 ]===============
--------------------[ Gather device info about WWAN modems ]--------------------
ID: com.canonical.certification::wwan_resource
Category: com.canonical.certification::wwan
... 8< -------------------------------------------------------------------------
mm_id: 0
hw_id: 
manufacturer: generic
model: MBIM [14C3:4D75]
firmware_revision: 81600.0000.00.29.21.24_GC D24
hardware_revision: V1.0.6

------------------------------------------------------------------------- >8 ---
Outcome: job passed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-04-10T03.28.23
==================================[ Results ]===================================
 ☑ : Gather device info about WWAN modems

# To ensure we could get the information through mmcli
u@u-Alder-Lake-Client-Platform:~$ python3 /var/tmp/checkbox-providers/base/bin/wwan_tests.py resources --use-cli
mm_id: 0
hw_id: None
manufacturer: generic
model: MBIM[14C3:4D75]
firmware_revision: 81600.0000.00.29.21.24_GC
hardware_revision: V1.0.6

# To ensure we could get the information through dbus
u@u-Alder-Lake-Client-Platform:~$ python3 /var/tmp/checkbox-providers/base/bin/wwan_tests.py resources 
mm_id: 0
hw_id: 
manufacturer: generic
model: MBIM [14C3:4D75]
firmware_revision: 81600.0000.00.29.21.24_GC D24
hardware_revision: V1.0.6

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.44%. Comparing base (6f0ca4e) to head (eb16794).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
+ Coverage   43.21%   43.44%   +0.22%     
==========================================
  Files         356      356              
  Lines       38662    38674      +12     
  Branches     6561     6561              
==========================================
+ Hits        16706    16800      +94     
+ Misses      21293    21211      -82     
  Partials      663      663              
Flag Coverage Δ
provider-base 16.89% <100.00%> (+0.60%) ⬆️

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.

pieqq
pieqq previously requested changes Apr 17, 2024
Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this!

I left a comment inline, because I think the unit tests are a bit convoluted. I propose another method.

providers/base/tests/test_wwan_tests.py Outdated Show resolved Hide resolved
included fw and hw revision for wwan resource job
fixed the test failed issue on CI environment
fixed unittest failed on python3.5 issue
fixed unit tests
fixed black coding style issue
@kissiel kissiel requested review from kissiel and removed request for pieqq May 22, 2024 10:32
Copy link
Contributor

@kissiel kissiel left a comment

Choose a reason for hiding this comment

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

I think the mocking in the test is broken.

providers/base/tests/test_wwan_tests.py Show resolved Hide resolved
providers/base/tests/test_wwan_tests.py Show resolved Hide resolved
Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

+1, LGTM

@Hook25 Hook25 dismissed pieqq’s stale review May 30, 2024 14:17

Code was updated

@Hook25 Hook25 merged commit 67fbbb3 into main May 30, 2024
20 checks passed
@Hook25 Hook25 deleted the add_wwan_fw_info branch May 30, 2024 14:17
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.

None yet

4 participants