Skip to content

Conversation

clundin55
Copy link

Filtersets can be used to reduce the amount of binaries archived in a test archive.

NOTE: Test binaries are not executed to collect a test list. This prevents filtering by test.

See feature request: #2648

Filtersets can be used to reduce the amount of binaries archived in a
test archive.

NOTE: Test binaries are not executed to collect a test list. This
prevents filtering by test.
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

❌ Patch coverage is 94.62366% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.62%. Comparing base (a362d9d) to head (87917fa).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
cargo-nextest/src/dispatch.rs 94.62% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2670      +/-   ##
==========================================
- Coverage   78.40%   77.62%   -0.78%     
==========================================
  Files         107      107              
  Lines       24864    24977     +113     
==========================================
- Hits        19495    19389     -106     
- Misses       5369     5588     +219     

☔ 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.

set_env_vars();

let filters = ["all()", "none()", "package(cdylib-example)"];
let expected_file_counts = [27, 11, 12];
Copy link
Author

Choose a reason for hiding this comment

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

This is brittle and it seems the file count varies per platform. I'll rewrite this once I have feedback on the implementation.

Copy link
Member

Choose a reason for hiding this comment

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

This does vary by platform but doesn't change much. Instead can you scan the archive to ensure that the expected binaries are available and the others aren't?

Copy link
Member

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

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

Looks quite good! Just a couple of comments.

Comment on lines +1767 to +1768
test_filter_builder.filter_binary_match(test_artifact, &ecx, filter_bound),
FilterBinaryMatch::Definite | FilterBinaryMatch::Possible
Copy link
Member

Choose a reason for hiding this comment

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

Rather than this I'd just reject test predicates entirely, returning a FiltersetParseErrors that contains all the errors (so you get a nice display). You could do it either at parsing time or as a pass afterwards (have a check_no_test_predicates method or similar).

set_env_vars();

let filters = ["all()", "none()", "package(cdylib-example)"];
let expected_file_counts = [27, 11, 12];
Copy link
Member

Choose a reason for hiding this comment

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

This does vary by platform but doesn't change much. Instead can you scan the archive to ensure that the expected binaries are available and the others aren't?

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