Skip to content

Conversation

@tomli380576
Copy link
Contributor

@tomli380576 tomli380576 commented Dec 17, 2025

Description

This PR fixes #1997 by specifying the -j option in fwts when we detect that we are in a snap environment.

Resolved issues

  1. Snap and Debian checkbox produces inconsistent fwts klog result #1997
  2. Fixed a few unbound variables and undefined variable access

Documentation

Basically we are telling fwts to read the directory in checkbox runtime instead of whatever /usr/share/fwts is inside a snap.

-j, --json-data-path         Specify path to fwts json data files - default is /usr/share/fwts

This PR also includes a small workaround for #2295.

Tests

Original unit tests

C3 submission: TODO

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 55.03%. Comparing base (c0dd7ce) to head (d76f4e8).
⚠️ Report is 46 commits behind head on main.

Files with missing lines Patch % Lines
...kbox-support/checkbox_support/scripts/fwts_test.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2252      +/-   ##
==========================================
+ Coverage   53.72%   55.03%   +1.30%     
==========================================
  Files         406      412       +6     
  Lines       43286    44441    +1155     
  Branches     7988     8208     +220     
==========================================
+ Hits        23254    24456    +1202     
+ Misses      19227    19149      -78     
- Partials      805      836      +31     
Flag Coverage Δ
checkbox-ng 71.56% <ø> (+0.22%) ⬆️
checkbox-support 69.63% <91.66%> (+4.34%) ⬆️
provider-base 32.47% <100.00%> (+1.56%) ⬆️
provider-certification-client 57.14% <ø> (ø)
provider-certification-server 57.14% <ø> (ø)
provider-genio 96.90% <ø> (ø)
provider-gpgpu 93.14% <ø> (ø)
provider-iiotg 100.00% <ø> (ø)
provider-resource 39.30% <ø> (ø)
provider-sru 97.97% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomli380576 tomli380576 requested a review from Copilot December 17, 2025 02:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #1997 by ensuring the fwts tool uses the correct data directory when running in a snap environment. When both CHECKBOX_RUNTIME and SNAP environment variables are detected, the script now passes the -j option to fwts with the path to the JSON data files within the snap's checkbox runtime directory.

Key Changes:

  • Added snap environment detection and dynamic fwts command construction with the -j flag
  • Enhanced type hints throughout the codebase for better type safety
  • Fixed unbound variable issues and improved variable initialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tomli380576 tomli380576 requested a review from Copilot January 26, 2026 02:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Snap and Debian checkbox produces inconsistent fwts klog result

2 participants