forked from nullpo-head/wsl-distrod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (35 loc) · 1.63 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
OUTPUT_ROOTFS_PATH ?= distrod/distrod_wsl_launcher/resources/distrod_root.tar.gz
build: distrod-release
rootfs: distrod-bins distrod/target/release/portproxy.exe
./distrod_packer/distrod_packer ./distrod $(OUTPUT_ROOTFS_PATH)
distrod-release: distrod-bins distrod/target/release/portproxy.exe
./distrod_packer/distrod_packer ./distrod opt_distrod.tar.gz --pack-distrod-opt-dir
distrod-bins:
cd distrod; cargo build --release -p distrod -p distrod-exec -p portproxy
unit-test-linux:
cd distrod; cargo test --verbose -p libs -p portproxy -p distrod-exec ${TEST_TARGETS}
integration-test-linux:
cd distrod/distrod/tests; ./test_runner.sh run
enter-integration-test-env:
@echo Run 'cargo test -p distrod'.
cd distrod/distrod/tests; ./test_runner.sh enter
ALL_DISTROS_IN_TESTING=ubuntu debian archlinux fedora centos almalinux rockylinux kali mint opensuse amazonlinux oracle gentoo
integration-test-linux-all-distros:
cd distrod/distrod/tests; \
for distro in $(ALL_DISTROS_IN_TESTING); do \
DISTRO_TO_TEST=$${distro} ./test_runner.sh run; \
done
test-linux: lint unit-test-linux integration-test-linux
lint:
shellcheck install.sh
clean:
cd distrod; cargo clean; cargo.exe clean
ifneq ($(shell uname -a | grep microsoft),) # This is a WSL environment, which means you can run .exe
ROOTFS_PATH = $(OUTPUT_ROOTFS_PATH)
OUTPUT_PORT_PROXY_EXE_PATH = distrod/target/release/portproxy.exe
$(ROOTFS_PATH): rootfs
include windows.mk
.PHONY: $(ROOTFS_PATH)
endif
.PHONY: build rootfs distrod-release distrod-bins lint clean\
unit-test-linux enter-integration-test-linux integration-test-linux integration-test-linux-all-distros test-linux