Skip to content

Commit

Permalink
Add PROFILE_FLAGS to profileable targets
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Nov 13, 2023
1 parent ea00a5c commit dffcfde
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ifeq ($(origin PROFILE), undefined)
else
PROFILE_FLAGS = -C instrument-coverage
endif

ifeq ($(origin FEDORA_RELEASE), undefined)
else
FEDORA_RELEASE_ARGS = --release=${FEDORA_RELEASE}
Expand Down Expand Up @@ -46,16 +51,16 @@ fmt-ci:
cd devicemapper-rs-sys && cargo fmt -- --check

build:
RUSTFLAGS="${DENY}" cargo build
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" cargo build

build-tests:
RUSTFLAGS="${DENY}" cargo test --no-run
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" cargo test --no-run

test:
RUSTFLAGS="${DENY}" RUST_BACKTRACE=1 cargo test -- --skip sudo_ --skip loop_
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" RUST_BACKTRACE=1 cargo test -- --skip sudo_ --skip loop_

sudo_test:
RUSTFLAGS="${DENY}" RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo test
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" RUST_BACKTRACE=1 RUST_TEST_THREADS=1 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo test

clippy:
RUSTFLAGS="${DENY}" \
Expand Down

0 comments on commit dffcfde

Please sign in to comment.