From eac1246a90e4db9db178834842879a4b1706a88d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 6 Oct 2014 12:28:26 +0200 Subject: [PATCH] Added a "check" target to run the testsuite. --- Makefile | 13 +++++++++---- README.md | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f6e6c89c..9d2bb25a 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,6 @@ ifdef BUILD_TESTS SUBDIRS += tests endif -.PHONY: all all: @if test ! -e config.mk; then \ echo "You didn't run ./configure ... exiting."; \ @@ -20,7 +19,6 @@ all: $(MAKE) -C $$dir || exit 1; \ done -.PHONY: install install: @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir install || exit 1; \ @@ -34,15 +32,22 @@ install: @echo "WARNING: in your ld.so.conf by default." @echo -.PHONY: uninstall uninstall: @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir uninstall || exit 1; \ done -.PHONY: clean +check: + @for f in bin/*; do \ + export PATH=$$f:$$PATH; \ + done + @export LD_PRELOAD=$$PWD/lib/libxbps.so + @kyua test -k tests/xbps/Kyuafile + clean: @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir clean || exit 1; \ done -rm -f config.mk _ccflag.{,c,err} + +.PHONY: all install uninstall check clean diff --git a/README.md b/README.md index e9f010ff..9c328bbf 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ To run the test suite make sure *kyua* is installed and run the following: ``` $ ./configure --enable-tests --enable-debug $ make -$ LD_PRELOAD=$PWD/lib/libxbps.so kyua test -k tests/xbps/Kyuafile +$ make check ``` ### Build instructions