Skip to content

Commit

Permalink
Makefile: add make test command
Browse files Browse the repository at this point in the history
Intruduce a test target in Makefile, that runs the e2e tests agains the built binary.

Signed-off-by: Matej Hrica <[email protected]>
  • Loading branch information
mtjhrc committed Jan 27, 2025
1 parent f19bccb commit 2e998ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ __pycache__
/libkrun.pc
init/init
examples/chroot_vm
test-prefix
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ifeq ($(PREFIX),)
PREFIX := /usr/local
endif

.PHONY: install clean $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS))
.PHONY: install clean test $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS))

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

Expand Down Expand Up @@ -135,4 +135,10 @@ install:

clean:
rm -f $(INIT_BINARY)
rm -rf test-prefix
cargo clean

test: $(LIBRARY_RELEASE_$(OS))
mkdir -p test-prefix
PREFIX=test-prefix make install
cd tests; PKG_CONFIG_PATH=../test-prefix/lib64/pkgconfig/ ./run.sh

0 comments on commit 2e998ee

Please sign in to comment.