fixup: Avoid host build of SBPF program test crates (#1711) #2145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In
commit da6f7f2
Author: Alexander Meißner AlexanderMeissner@gmx.net
Date: Tue Jun 18 23:10:40 2024 +0200
we changed the test selection process slightly, switching from the
test-bpf
feature tosbf_rust
feature, and marking individual tests, rather then the whole module. The problem is that now when I run../../cargo check --bins --tests
I see unused warnings for all the modules imported by the
simulation
andsysvar
modules. At the later are, effectively, empty whensbf_rust
is not set.Summary of Changes
Moving the config flag back to the module level seems to do the intended thing and removes the warnings. Alternatively, we could mark the
use
statement with an explicit#[cfg(feature = "sbf_rust")]
, but it seems that all the tests are designed to be run only whensbf_rust
is set.