-
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
24 additions
and
11 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 |
---|---|---|
@@ -1,25 +1,33 @@ | ||
# Makefile | ||
|
||
EXTRA_CARGO_ARGS ?= | ||
WITH_STABLE_TOOLCHAIN ?= | ||
|
||
.PHONY: format clippy test test_nightly | ||
|
||
all: format clippy test test_nightly | ||
|
||
# Format code in-place using rustfmt. | ||
all: format clippy test | ||
|
||
## Format code in-place using rustfmt. | ||
format: | ||
cargo fmt --all | ||
|
||
# Run clippy. | ||
## 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 test available on stable toolchain. | ||
## Run test. | ||
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 | ||
|
||
# Run test available on nightly toolchain. Assumes the default toolchain is nightly. | ||
test_nightly: | ||
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