Add make check targets

lets add some built in self testing to the make files.  Currently lets
just run irqbalance in foreground/oneshot/debug mode to capture the log
and ensure that nothing crashes

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
Neil Horman 2018-05-14 14:08:19 -04:00 committed by Neil Horman
parent aeb1bbe108
commit 71bd666e05
4 changed files with 9 additions and 1 deletions

View file

@ -24,6 +24,8 @@ AUTOMAKE_OPTIONS = no-dependencies
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = COPYING autogen.sh misc/irqbalance.service misc/irqbalance.env
SUBDIRS = tests
UI_DIR = ui
AM_CFLAGS = $(LIBCAP_NG_CFLAGS) $(GLIB2_CFLAGS)
AM_CPPFLAGS = -I${top_srcdir} -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE

View file

@ -81,7 +81,7 @@ AS_IF(
]
)
AC_OUTPUT(Makefile)
AC_OUTPUT(Makefile tests/Makefile)
AC_MSG_NOTICE()
AC_MSG_NOTICE([irqbalance Version: $VERSION])

2
tests/Makefile.am Normal file
View file

@ -0,0 +1,2 @@
check_SCRIPTS = runoneshot.sh
TESTS = runoneshot.sh

4
tests/runoneshot.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
exec ../irqbalance --debug --oneshot --foreground