Skip to content

Commit

Permalink
add makefile
Browse files Browse the repository at this point in the history
Signed-off-by: tabokie <[email protected]>
  • Loading branch information
tabokie committed Aug 2, 2022
1 parent 7ab1af2 commit 47ce01b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Makefile

EXTRA_CARGO_ARGS ?=

.PHONY: format clippy test test_nightly

all: format clippy test test_nightly

# Format code in-place using rustfmt.
format:
cargo fmt --all

# Run clippy.
clippy:
cargo clippy --all --all-features --all-targets -- -D clippy::all

# Run test available on stable toolchain.
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:
cargo test --all --features all_except_failpoints ${EXTRA_CARGO_ARGS} -- --nocapture
cargo test --test failpoints --all-features ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture

0 comments on commit 47ce01b

Please sign in to comment.