1
0
mirror of https://github.com/containers/youki synced 2024-09-20 10:54:22 +02:00

[Trivial] Fix makefile targets to use PHONY

Signed-off-by: Eric Fang <yihuaf@unkies.org>
This commit is contained in:
Eric Fang 2023-03-29 18:22:01 +02:00
parent 04de7bf3b1
commit 8a8b8e34a0
3 changed files with 25 additions and 6 deletions

View File

@ -2,53 +2,71 @@ ROOT = $(shell git rev-parse --show-toplevel)
# builds
.PHONY:build
build: youki-release
.PHONY: youki
youki: youki-dev # helper
.PHONY: youki-dev
youki-dev:
./scripts/build.sh -o $(ROOT) -c youki
.PHONY: youki-release
youki-release:
./scripts/build.sh -o $(ROOT) -r -c youki
.PHONY: runtimetest
runtimetest:
./scripts/build.sh -o $(ROOT) -r -c runtimetest
.PHONY: rust-oci-tests-bin
rust-oci-tests-bin:
./scripts/build.sh -o $(ROOT) -r -c integration-test
.PHONY: all
all: youki-release rust-oci-tests-bin runtimetest
# Tests
.PHONY: unittest
unittest:
cd ./crates && LD_LIBRARY_PATH=${HOME}/.wasmedge/lib cargo test --all --all-targets --all-features
.PHONY: featuretest
featuretest:
./scripts/features_test.sh
.PHONY: oci-tests
oci-tests: youki-release
./scripts/oci_integration_tests.sh $(ROOT)
.PHONY: rust-oci-tests
rust-oci-tests: youki-release runtimetest rust-oci-tests-bin
./scripts/rust_integration_tests.sh $(ROOT)/youki
.PHONY: validate-rust-oci-runc
validate-rust-oci-runc: runtimetest rust-oci-tests-bin
./scripts/rust_integration_tests.sh runc
.PHONY: containerd-test
containerd-test: youki-dev
VAGRANT_VAGRANTFILE=Vagrantfile.containerd2youki vagrant up
VAGRANT_VAGRANTFILE=Vagrantfile.containerd2youki vagrant provision --provision-with test
.PHONY: test-oci
test-oci: oci-tests rust-oci-tests
.PHONY: test-all
test-all: unittest featuretest oci-tests containerd-test # currently not doing rust-oci here
# Misc
.PHONY: lint
lint:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: clean
clean:
./scripts/clean.sh $(ROOT)

View File

@ -1,10 +1,11 @@
.PHONY : debug release
.PHONY: debug
debug:
cargo build && cp ./target/debug/youki ./youki_bin
.PHONY: release
release:
cargo build --release && cp ./target/release/youki ./youki_bin
.PHONY: clean
clean:
rm ./youki_bin

View File

@ -1,6 +1,3 @@
.PHONY: runtimetest integration-test
TGT = x86_64-unknown-linux-gnu
FLAG =
ifeq ("$(FLAG)","--release")
@ -9,14 +6,17 @@ else
DIR = debug
endif
.PHONY: all
all: runtimetest integration-test
.PHONY: runtimetest
runtimetest:
cd ./runtimetest && cargo build $(FLAG) && cp ./target/$(TGT)/$(DIR)/runtimetest ../runtimetest_bin
.PHONY: integration-test
integration-test:
cd ./integration_test && cargo build $(FLAG) && cp ./target/$(DIR)/integration_test ../integration_test_bin
.PHONY: clean
clean:
rm ./integration_test_bin && rm ./runtimetest_bin