Skip to content

Commit ef55e4f

Browse files
committed
Makefile: add make test command
Intruduce a test target in Makefile, that runs the e2e tests agains the built binary. Signed-off-by: Matej Hrica <[email protected]>
1 parent 583de27 commit ef55e4f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ __pycache__
99
/libkrun.pc
1010
init/init
1111
examples/chroot_vm
12+
test-prefix

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ifeq ($(PREFIX),)
7474
PREFIX := /usr/local
7575
endif
7676

77-
.PHONY: install clean $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS))
77+
.PHONY: install clean test $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS))
7878

7979
all: $(LIBRARY_RELEASE_$(OS)) libkrun.pc
8080

@@ -135,4 +135,10 @@ install:
135135

136136
clean:
137137
rm -f $(INIT_BINARY)
138+
rm -rf test-prefix
138139
cargo clean
140+
141+
test: $(LIBRARY_RELEASE_$(OS))
142+
mkdir -p test-prefix
143+
PREFIX=test-prefix make install
144+
cd tests; PKG_CONFIG_PATH=../test-prefix/lib64/pkgconfig/ ./run.sh

0 commit comments

Comments
 (0)