-
Notifications
You must be signed in to change notification settings - Fork 2
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
Granular controls for testing? #29
Comments
Hmm, actually, the more I think about it, the use-conditional testing seems pretty stupid. As is, there is no way to make Like for instance, if the deps could be conditionally patched out as well, then it might make sense, but we VERY MUCH SHOULD NOT BE DOING THIS AT ANY KIND OF SCALE, ( at least, not for testing purposes ) |
Nope. That's wrong, because .... if a crate doesn't have any And we can't have that being a default :D Special-casing required. |
Though ... hmm. cargo test --features "" >_> 😰 |
Supporting messes like this may be tricky though. Hmm. src_test() {
# std required due to [not( feature = std ),feature...]
local targets=(
''
arrayvec
correct
default
dtoa
grisu3
radix
rounding
ryu
table
trim_floats
unchecked_index
# --all-features can't work because ryu and grius3 are mutex
"ryu default arrayvec correct dtoa radix rounding table trim_floats unchecked_index"
"grius3 arrayvec correct dtoa radix rounding table trim_floats unchecked_index"
)
for i in "${targets[@]}"; do
einfo "Testing --features 'std $i'"
ecargo test --no-default-features --features "std ${i}" || die "Test suite with --features ${i} failed"
done
} |
Nah, gonna need to rethink this. ''
# alloc w/o std uses nightly feature(alloc)
"std alloc"
default
... |
Just some food for thought atm:
This is just a prototype pattern for something which I'd like to see native eclass support for.
Maybe have a bash array like:
Where:
"feature/params"
And params are something like:
Values without "/" are interpreted as:
And the default value for the array is:
ECARGO_TEST_TARGETS=( "default/test" )
We could special case "default" to never pass
--features
, but given--features default
works just fine, and you need to have a feature named 'default' in order to have defaulted features ... it seems YAGNI, yet.The text was updated successfully, but these errors were encountered: