Skip to content

Commit fc58d41

Browse files
author
Pierre-Etienne Bougue
committed
More robust cargo test
Running doctests and all-targets (see rust-lang/cargo#6669)
1 parent 02bf251 commit fc58d41

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ lint: ## Check quality of the code
2626
cargo clippy --workspace --all-features --all-targets -- --warn clippy::cargo --allow clippy::multiple_crate_versions --deny warnings
2727

2828
test: ## Launch all tests
29-
# Run all the tests of `transit_model` in the entire repository,
30-
# activating all features (including `xmllint`), then without features
31-
# to make sure that both work
32-
cargo test --workspace --all-features
33-
cargo test --workspace
29+
# Run all the tests of `transit_model` in the entire repository.
30+
31+
# First activating all features (including `xmllint`)
32+
cargo test --workspace --all-features --all-targets # `--all-targets` but no doctests
33+
cargo test --workspace --all-features --doc # doctests only
34+
# Then without features
35+
cargo test --workspace --all-targets # `--all-targets` but no doctests
36+
cargo test --workspace --doc # doctests only
3437

3538
help: ## Print this help message
3639
@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(CURDIR)/$(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)