-
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.
chore: update CI toolchain and clean up code (#244)
Update toolchain to 2022-07-13, add a makefile. A few minor refactorings: - Refactor `scan_messages` interface to share more code paths, and add tests for them. - Hide `LogFileFormat` from outer crate, it should stay an implementation detail of file_pipe_log. - Change `DataLayout` to `u64`, because otherwise it needs additional care to make sure `Alignment(0)` and `NoAlignment` don't coexist. - Remove some tests that aren't very useful. Signed-off-by: tabokie <[email protected]>
- Loading branch information
Showing
24 changed files
with
664 additions
and
1,004 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
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
Oops, something went wrong.