diff --git a/Makefile b/Makefile index 524d6a9..0162277 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,9 @@ default: cp src/libkeepalive.so libkeepalive.so strip -s libkeepalive.so +test: default + make -C test/ runtest + clean: make -C src/ clean make -C test/ clean diff --git a/test/Makefile b/test/Makefile index 2a0f6e2..6baf822 100644 --- a/test/Makefile +++ b/test/Makefile @@ -11,5 +11,11 @@ CC=gcc default: test +TENV = LD_PRELOAD=../libkeepalive.so SELFTEST=on +runtest: + ${TENV} KEEPALIVE=off ./test + ${TENV} KEEPCNT=13 KEEPIDLE=23 KEEPINTVL=42 ./test + ${TENV} KEEPCNT=42 KEEPIDLE=13 KEEPINTVL=23 ./test + clean: rm -f test