-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·37 lines (26 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.PHONY: all test build clean
all: clean test build
LEVEL ?= "info"
TEST ?= ""
DIFF ?= false
DOCKER_DESTINATION ?= "docker://127.0.0.1:5000/test"
build-debug:
cargo build
build:
cargo build --release
test: clean
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test -- --nocapture
test-by-name: clean
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test $(TEST) -- --nocapture
cover:
grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" --ignore "src/main.rs" --ignore "src/api/*" -o target/coverage/html
cp target/coverage/html/html/badges/flat.svg assets/
run-d2m:
cargo run -- --config imagesetconfig.yaml --diff-tar $(DIFF) --loglevel $(LEVEL) --destination $(DOCKER_DESTINATION)
run-m2d:
cargo run -- --config imagesetconfig.yaml --diff-tar $(DIFF) --loglevel $(LEVEL) --destination file://
clean-all:
rm -rf cargo-test*
cargo clean
clean-tests:
rm -rf cargo-test*