Skip to content

Commit

Permalink
hardcode cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
orthecreedence committed Jan 21, 2024
1 parent ec64010 commit 5950e89
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
VARS ?= vars.mk
-include $(VARS)

CARGO ?= $(shell which cargo)
override CARGO_BUILD_ARGS += --features "$(FEATURES)" --color=always

all: build

run: build
$(CARGO) run $(CARGO_BUILD_ARGS)
cargo run $(CARGO_BUILD_ARGS)

build:
$(CARGO) build $(CARGO_BUILD_ARGS)
cargo build $(CARGO_BUILD_ARGS)

release: override CARGO_BUILD_ARGS += --release
release: build
Expand All @@ -23,21 +22,21 @@ doc:

test-release: override CARGO_BUILD_ARGS += --release
test-release:
$(CARGO) test $(TEST) $(CARGO_BUILD_ARGS) -- --nocapture
cargo test $(TEST) $(CARGO_BUILD_ARGS) -- --nocapture

test:
$(CARGO) test $(TEST) $(CARGO_BUILD_ARGS) -- --nocapture
cargo test $(TEST) $(CARGO_BUILD_ARGS) -- --nocapture

test-panic: override FEATURES += panic-on-error
test-panic:
RUST_BACKTRACE=1 \
$(CARGO) test \
cargo test \
$(TEST) \
$(CARGO_BUILD_ARGS) -- \
--nocapture

test-st:
$(CARGO) test $(TEST) $(CARGO_BUILD_ARGS) -- --nocapture --test-threads 1
cargo test $(TEST) $(CARGO_BUILD_ARGS) -- --nocapture --test-threads 1

clean:
rm -rf target/
Expand Down

0 comments on commit 5950e89

Please sign in to comment.