Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ run_if() (
)

unit() (
eval run_if "${LINT:-true}" cargo clippy "$@" -- -D warnings
eval run_if "${DOC:-false}" cargo doc "$@"
eval run_if "${BUILD:-true}" cargo build "${BUILD_FLAGS:-}" "$@"
eval run_if "${TEST:-true}" cargo test "${TEST_FLAGS:-}" "$@"
read -ra build_flags <<<"${BUILD_FLAGS:-}"
read -ra test_flags <<<"${TEST_FLAGS:-}"
Comment thread
KSXGitHub marked this conversation as resolved.
run_if "${LINT:-true}" cargo clippy "$@" -- -D warnings
run_if "${DOC:-false}" cargo doc "$@"
run_if "${BUILD:-true}" cargo build ${build_flags[@]+"${build_flags[@]}"} "$@"
run_if "${TEST:-true}" cargo test ${test_flags[@]+"${test_flags[@]}"} "$@"
)

run_if "${FMT:-true}" cargo fmt -- --check
Expand Down
Loading