From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Date: Thu, 23 May 2019 16:25:35 +0000 (+0200)
Subject: tests: remove make check target
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0dd2125c8ca9;p=qemu-gpiodev%2Flibgpiod.git

tests: remove make check target

Having both --enable-tests configure option and the check make target
seems redundant and confusing. Especially since the tests won't even
run without appropriate permissions for /dev/gpiochipX anyway.

Remove the check target and the --enable-install-tests option. From now
on the tests - if enabled - are built as a regular program installed to
${prefix}/bin.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---

diff --git a/configure.ac b/configure.ac
index 6844e15..bf779ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,13 +107,6 @@ then
 	AC_CHECK_HEADERS([sys/signalfd.h], [], [HEADER_NOT_FOUND_TOOLS([sys/signalfd.h])])
 fi
 
-AC_ARG_ENABLE([install-tests],
-	[AC_HELP_STRING([--enable-install-tests],
-		[enable install tests [default=no]])],
-	[if test "x$enableval" = xyes; then with_install_tests=true; with_tests=true; fi],
-	[with_install_tests=false])
-AM_CONDITIONAL([WITH_INSTALL_TESTS], [test "x$with_install_tests" = xtrue])
-
 AC_ARG_ENABLE([tests],
 	[AC_HELP_STRING([--enable-tests],
 		[enable libgpiod tests [default=no]])],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4d1e6d5..4016408 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,11 +11,7 @@ AM_CFLAGS += -Wall -Wextra -g $(KMOD_CFLAGS) $(UDEV_CFLAGS)
 AM_LDFLAGS = -pthread
 LDADD = $(top_builddir)/lib/libgpiod.la $(KMOD_LIBS) $(UDEV_LIBS)
 
-if WITH_INSTALL_TESTS
 bin_PROGRAMS = gpiod-test
-else
-check_PROGRAMS = gpiod-test
-endif
 
 gpiod_test_SOURCES =	gpiod-test.c \
 			gpiod-test.h \
@@ -37,7 +33,7 @@ gpiod_test_SOURCES +=	tests-gpiodetect.c \
 
 endif
 
-check: check-am
+all-local:
 	@echo " ********************************************************"
 	@echo " * Tests have been built as tests/gpio-test.            *"
 	@echo " *                                                      *"