-
Notifications
You must be signed in to change notification settings - Fork 114
/
Makefile
51 lines (41 loc) · 2.43 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
VERSION = $(shell git describe --tags --always --dirty)
INTERACTIVE ?= i
build: pre
cargo build --examples
pre:
cargo fmt --all -- --check
cargo deny check licenses
cargo clippy --all-targets
cargo clippy --all-targets --no-default-features
cargo clippy --all-targets --features=abi-7-30
xfstests:
docker build -t fuser:xfstests -f xfstests.Dockerfile .
# Additional permissions are needed to be able to mount FUSE
docker run --rm -$(INTERACTIVE)t --cap-add SYS_ADMIN --cap-add IPC_OWNER --device /dev/fuse --security-opt apparmor:unconfined \
--memory=2g --kernel-memory=200m \
-v "$(shell pwd)/logs:/code/logs" fuser:xfstests bash -c "cd /code/fuser && ./xfstests.sh"
pjdfs_tests: pjdfs_tests_fuse2 pjdfs_tests_fuse3 pjdfs_tests_pure
pjdfs_tests_fuse2:
docker build --build-arg BUILD_FEATURES='--features=abi-7-19' -t fuser:pjdfs-2 -f pjdfs.Dockerfile .
# Additional permissions are needed to be able to mount FUSE
docker run --rm -$(INTERACTIVE)t --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined \
-v "$(shell pwd)/logs:/code/logs" fuser:pjdfs-2 bash -c "cd /code/fuser && ./pjdfs.sh"
pjdfs_tests_fuse3:
docker build --build-arg BUILD_FEATURES='--features=abi-7-31' -t fuser:pjdfs-3 -f pjdfs.Dockerfile .
# Additional permissions are needed to be able to mount FUSE
docker run --rm -$(INTERACTIVE)t --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined \
-v "$(shell pwd)/logs:/code/logs" fuser:pjdfs-3 bash -c "cd /code/fuser && ./pjdfs.sh"
pjdfs_tests_pure:
docker build --build-arg BUILD_FEATURES='--no-default-features --features=abi-7-19' -t fuser:pjdfs-pure -f pjdfs.Dockerfile .
# Additional permissions are needed to be able to mount FUSE
docker run --rm -$(INTERACTIVE)t --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined \
-v "$(shell pwd)/logs:/code/logs" fuser:pjdfs-pure bash -c "cd /code/fuser && ./pjdfs.sh"
mount_tests:
docker build -t fuser:mount_tests -f mount_tests.Dockerfile .
# Additional permissions are needed to be able to mount FUSE
docker run --rm -$(INTERACTIVE)t --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined \
fuser:mount_tests bash -c "cd /code/fuser && bash ./simplefs_tests.sh"
docker run --rm -$(INTERACTIVE)t --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined \
fuser:mount_tests bash -c "cd /code/fuser && bash ./mount_tests.sh"
test: pre mount_tests pjdfs_tests xfstests
cargo test