-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tabokie <[email protected]>
- Loading branch information
Showing
3 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Makefile | ||
|
||
## Additionaly arguments passed to cargo. | ||
EXTRA_CARGO_ARGS ?= | ||
## Whether to disable nightly-only feature. [true/false] | ||
WITH_STABLE_TOOLCHAIN ?= | ||
|
||
.PHONY: format clippy test | ||
|
||
all: format clippy test | ||
|
||
## Format code in-place using rustfmt. | ||
format: | ||
cargo fmt --all | ||
|
||
## Run clippy. | ||
ifeq ($(WITH_STABLE_TOOLCHAIN), true) | ||
clippy: | ||
cargo clippy --all --features all_stable --all-targets -- -D clippy::all | ||
else | ||
clippy: | ||
cargo clippy --all --all-features --all-targets -- -D clippy::all | ||
endif | ||
|
||
## Run tests. | ||
ifeq ($(WITH_STABLE_TOOLCHAIN), true) | ||
test: | ||
cargo test --all --features all_stable_except_failpoints ${EXTRA_CARGO_ARGS} -- --nocapture | ||
cargo test --test failpoints --features all_stable ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture | ||
else | ||
test: | ||
cargo test --all --features all_except_failpoints ${EXTRA_CARGO_ARGS} -- --nocapture | ||
cargo test --test failpoints --all-features ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters