Skip to content

Commit

Permalink
Fix testing of features at the workspace level
Browse files Browse the repository at this point in the history
The test.sh script contains logic to avoid testing features that don't
exist in the subcrates, but this logic breaks apart when run from the
top level.  Fix this by always running with the requested features at
the top level.
  • Loading branch information
jmmv committed Dec 3, 2023
1 parent 57715d5 commit db890b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ run_tests() {
info "Testing ${dir} with default features"
cargo test ${cargo_args} -- --include-ignored ${test_args}
else
if grep -q "^{feature} = \[" Cargo.toml; then
if [ "${dir}" = . ] || grep -q "^{feature} = \[" Cargo.toml; then
info "Testing ${dir} with feature=${feature}"
cargo test --features="${feature}" ${cargo_args} -- --include-ignored ${test_args}
else
Expand Down

0 comments on commit db890b2

Please sign in to comment.