forked from levex/cgroups-rs
-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (51 loc) · 1.31 KB
/
Makefile
File metadata and controls
65 lines (51 loc) · 1.31 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
all: debug fmt test
#
# Build
#
.PHONY: debug
debug:
RUSTFLAGS="--deny warnings" cargo build
.PHONY: release
release:
cargo build --release
.PHONY: build
build: debug
#
# Tests and linters
#
# Tests that manipulate cgroups should run in sequence, so that
# `--test-threads=1` is used.
test: test-systemd test-fs-manager test-systemd-manager
cargo test --all-features -- --color always \
--nocapture \
--skip systemd::dbus::client::tests \
--skip manager::fs::tests \
--skip manager::systemd::tests
.PHONY: test-systemd
# Tests that manipulate cgroups should run in sequence, so that
# `--test-threads=1` is used.
test-systemd:
cargo test --package cgroups-rs --lib \
-- systemd::dbus::client::tests \
--color always --nocapture \
--test-threads=1
.PHONY: test-fs-manager
# See test-systemd
test-fs-manager:
cargo test --all-features --package cgroups-rs \
--lib -- manager::fs::tests \
--color always --nocapture --test-threads=1
.PHONY: test-systemd-manager
# See test-systemd
test-systemd-manager:
cargo test --all-features --package cgroups-rs \
--lib -- manager::systemd::tests \
--color always --nocapture --test-threads=1
.PHONY: check
check: fmt clippy
.PHONY: fmt
fmt:
cargo fmt --all -- --check
.PHONY: clippy
clippy:
cargo clippy --all-targets --all-features -- -D warnings