Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Reactivate library tests
Baptiste Daroussin committed 11 years ago
commit a7320abb668ca0bf7864efd867acea7ad22d333f
parent 4a4aa24
3 files changed +45 -11
modified Makefile.am
@@ -12,6 +12,7 @@ dist-hook:
	rm -rf `find $(distdir)/external -type d -name .deps`

check-local:
+
	make -C $(top_srcdir)/tests/ check-local
	kyua --config=none test \
		--kyuafile='$(top_srcdir)/Kyuafile' \
		--build-root='$(top_builddir)'
modified tests/Kyuafile
@@ -1,6 +1,8 @@
-
syntax('kyuafile', 1)
+
syntax("kyuafile", 1)

-
test_suite('prop: test-suite = pkgng')
+
test_suite("pkg")
+

+
atf_test_program{name='pkg_validation'}
+
atf_test_program{name='pkg_printf'}

include('frontend/Kyuafile')
-
include('lib/Kyuafile')
modified tests/Makefile.am
@@ -1,17 +1,48 @@
AUTOMAKE_OPTIONS=	subdir-objects

-
pkg_printf_SOURCES=	lib/pkg_printf_test.c
-
pkg_printf_CFLAGS=	-I$(top_srcdir)/libpkg -DTESTING
-
pkg_printf_LDADD=	$(top_builddir)/libpkg/libpkg.la -latf-c
-
pkg_printf_LDFLAGS=	-Wl,-rpath=\$$ORIGIN/../.libs
+
pkg_printf_SOURCES=	lib/pkg_printf_test.c \
+
			lib/pkg_printf.c
+

+
CLEANFILES=		lib/pkg_printf.c
+
BUILT_SOURCES=		lib/pkg_printf.c
+

+
pkg_printf_CFLAGS=	-I$(top_srcdir)/libpkg -DTESTING \
+
			-I$(top_srcdir)/external/sqlite \
+
			-I$(top_srcdir)/external/uthash \
+
			-I$(top_srcdir)/external/libucl/include
+
pkg_printf_LDADD= $(top_builddir)/libpkg/libpkg_static.la \
+
			$(top_builddir)/external/libsbuf_static.la \
+
			$(pkg_OBJECTS) \
+
			@LIBJAIL_LIB@ \
+
			@LIBEXECINFO_LIB@ \
+
			@LIBELF_LIB@ \
+
			@LDNS_LIBS@ \
+
			-lfetch \
+
			-larchive \
+
			-lutil \
+
			-lm \
+
			-latf-c
pkg_validation_SOURCES=	lib/pkg_validation.c
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
+
pkg_validation_LDADD= $(top_builddir)/libpkg/libpkg_static.la \
+
			$(top_builddir)/external/libsbuf_static.la \
+
			$(pkg_OBJECTS) \
+
			@LIBJAIL_LIB@ \
+
			@LIBEXECINFO_LIB@ \
+
			@LIBELF_LIB@ \
+
			@LDNS_LIBS@ \
+
			-lfetch \
+
			-larchive \
+
			-lutil \
+
			-lm \
+
			-latf-c

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

-
regression-test:
-
	atf-run | atf-report
+
check-local: $(tests_programs)
+

+
lib/pkg_printf.c:
+
	@echo "    CP    " $@;
+
	@cp $(top_srcdir)/libpkg/pkg_printf.c $@