summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMarius Bakke <marius@devup.no>2020-08-01 18:02:22 +0200
committerLucas De Marchi <lucas.demarchi@intel.com>2021-01-07 19:44:50 -0800
commit847247a4a8b50f0fc2f6021d734c15f0824b85c2 (patch)
tree360925629788bcff65fb16192ae63d8a331aaf03 /Makefile.am
parentb5683f45d9f4a640c120b579f05b2ee024790f56 (diff)
downloadkmod-847247a4a8b50f0fc2f6021d734c15f0824b85c2.tar.gz
testsuite: Automatically skip tests that fail when sysconfdir != /etc.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am12
1 files changed, 5 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index acde92b..b29e943 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -280,13 +280,7 @@ TESTSUITE_OVERRIDE_LIBS = \
TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \
avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl
-check-sysconfdir:
- $(AM_V_at)if test "$(sysconfdir)" != "/etc" -a "$(sysconfdir)" != "/etc/"; then \
- echo "warning: Some tests will fail without --sysconfdir=/etc" >&2; \
- fi
-.PHONY: check-sysconfdir
-
-check-am: rootfs check-sysconfdir
+check-am: rootfs
EXTRA_DIST += \
@@ -341,6 +335,10 @@ TESTSUITE_LDADD = \
testsuite/libtestsuite.la libkmod/libkmod-internal.la \
shared/libshared.la
+if KMOD_SYSCONFDIR_NOT_ETC
+TESTSUITE_CPPFLAGS += -DKMOD_SYSCONFDIR_NOT_ETC
+endif
+
check_LTLIBRARIES += testsuite/libtestsuite.la
testsuite_libtestsuite_la_SOURCES = \
testsuite/testsuite.c testsuite/testsuite.h