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 += \
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
], [
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
+# Some tests are skipped when sysconfdir != /etc.
+AM_CONDITIONAL([KMOD_SYSCONFDIR_NOT_ETC], [test "x$sysconfdir" != "x/etc"])
#####################################################################
# Default CFLAGS and LDFLAGS
}
DEFINE_TEST(blacklist_1,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if modules are correctly blacklisted",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-blacklist/",
}
DEFINE_TEST(depmod_modules_order_for_compressed,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if depmod let aliases in right order when using compressed modules",
.config = {
[TC_UNAME_R] = MODULES_ORDER_UNAME,
exit(EXIT_FAILURE);
}
DEFINE_TEST(depmod_detect_loop,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if depmod detects module loops correctly",
.config = {
[TC_UNAME_R] = "4.4.4",
exit(EXIT_FAILURE);
}
DEFINE_TEST(depmod_search_order_external_first,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if depmod honor external keyword with higher priority",
.config = {
[TC_UNAME_R] = "4.4.4",
exit(EXIT_FAILURE);
}
DEFINE_TEST(depmod_search_order_override,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if depmod honor override keyword",
.config = {
[TC_UNAME_R] = "4.4.4",
exit(EXIT_FAILURE);
}
DEFINE_TEST(modprobe_show_alias_to_none,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if modprobe --show-depends doesn't explode with an alias to nothing",
.config = {
[TC_UNAME_R] = "4.4.4",
exit(EXIT_FAILURE);
}
DEFINE_TEST(modprobe_softdep_loop,
+#if defined(KMOD_SYSCONFDIR_NOT_ETC)
+ .skip = true,
+#endif
.description = "check if modprobe breaks softdep loop",
.config = {
[TC_UNAME_R] = "4.4.4",