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

tests: automatically run nested tests for certain go changes #15075

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maykathm
Copy link
Contributor

This will automatically trigger nested tests if certain key areas of the go code are changed, while excluding changes to go tests. The change will be helpful in cases where a developer makes a change and should have added the "Run nested" label but forgot to do so.

As an example, any changes inside the kernel directory will automatically trigger nested tests:

$ tests/lib/external/snapd-testing-tools/utils/spread-filter -r tests/lib/spread/rules/nested.yaml -p "google:ubuntu-24.04-64" -c kernel/fde/fde.go 
google:ubuntu-24.04-64:tests/nested/

while changes to a key directory but to a unit test will not:

$ tests/lib/external/snapd-testing-tools/utils/spread-filter -r tests/lib/spread/rules/nested.yaml -p "google:ubuntu-24.04-64" -c overlord/devicestate/systems_test.go 

$

…lly run nested tests if some key areas of go code is changed
@maykathm maykathm added Simple 😃 A small PR which can be reviewed quickly Skip spread Indicate that spread job should not run labels Feb 13, 2025
Copy link

Thu Feb 13 17:49:54 UTC 2025

Spread tests skipped

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@1a8abe6). Learn more about missing BASE report.
Report is 213 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #15075   +/-   ##
=========================================
  Coverage          ?   78.06%           
=========================================
  Files             ?     1179           
  Lines             ?   157706           
  Branches          ?        0           
=========================================
  Hits              ?   123118           
  Misses            ?    26943           
  Partials          ?     7645           
Flag Coverage Δ
unittests 78.06% <ø> (?)

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.

Copy link
Member

@Meulengracht Meulengracht left a comment

Choose a reason for hiding this comment

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

Thank you for this change!

Copy link
Member

@alfonsosanchezbeato alfonsosanchezbeato left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly Skip spread Indicate that spread job should not run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants