Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Rework the atf detection so the tests/Makefile* always get generated
Baptiste Daroussin committed 12 years ago
commit ce9ba22c04b6908e6cf407d3344a7977d6c0ba98
parent eabab5c
3 files changed +7 -6
modified Makefile.am
@@ -10,4 +10,4 @@ EXTRA_DIST= docs
dist-hook:
	rm -rf `find $(distdir)/external -type d -name .deps`

-
SUBDIRS = external libpkg src @BUILD_TESTS@ scripts
+
SUBDIRS = external libpkg src tests scripts
modified configure.ac
@@ -118,8 +118,7 @@ AC_CHECK_HEADER([sys/sbuf.h], [
])

AC_CHECK_HEADER([atf-c.h], [
-
	 BUILD_TESTS="tests"
-
	 AC_CONFIG_FILES(tests/Makefile)
+
	 TESTS="\$(test_program)"
 ])

AC_CHECK_HEADER([sys/capability.h], [
@@ -137,13 +136,13 @@ AC_SUBST([LIBSBUF_LIB])
AC_SUBST([LIBSBUF_BUNDLED])
AC_SUBST([LIBSBUF_INCLUDE])
AC_SUBST([LIBJAIL_LIB])
-
AC_SUBST([HAVE_TEST])
-
AC_SUBST([BUILD_TESTS])
+
AC_SUBST([TESTS])

AC_CONFIG_FILES(Makefile \
		src/Makefile \
		external/Makefile \
		scripts/Makefile \
+
		tests/Makefile \
		libpkg/Makefile
		libpkg/pkg.h \
		libpkg/pkg.pc
modified tests/Makefile.am
@@ -9,7 +9,9 @@ pkg_validation_CFLAGS= -I$(top_srcdir)/libpkg -DTESTING
pkg_validation_LDADD=	$(top_builddir)/libpkg/libpkg.la -latf-c
pkg_validation_LDFLAGS=	-Wl,-rpath=\$$ORIGIN/../.libs

-
check_PROGRAMS=	pkg_printf pkg_validation
+
tests_programs=	pkg_printf pkg_validation
+
EXTRA_PROGRAMS=	$(tests_programs)
+
check_PROGRAMS=	@TESTS@

regression-test:
	@echo "ATF/KYUA has change our testing framework is not compatible for now"