summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2014-11-05 16:13:42 +0000
committerdes <des@FreeBSD.org>2014-11-05 16:13:42 +0000
commitfc4ab4a932b7fc750af38ab31094db013ac3720e (patch)
tree5d8df9e7bf30ced42d71036dc7716695c29dadbb /lib
parent0ce449d624e1127898a7be462aa05fe72a66faa4 (diff)
downloadFreeBSD-src-fc4ab4a932b7fc750af38ab31094db013ac3720e.zip
FreeBSD-src-fc4ab4a932b7fc750af38ab31094db013ac3720e.tar.gz
Hook up OpenPAM's own unit tests to the build.
Diffstat (limited to 'lib')
-rw-r--r--lib/libpam/libpam/Makefile4
-rw-r--r--lib/libpam/libpam/tests/Makefile19
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile
index f6c9063..a681a82 100644
--- a/lib/libpam/libpam/Makefile
+++ b/lib/libpam/libpam/Makefile
@@ -199,4 +199,8 @@ DPSRCS= openpam_static.c
INCS= ${HEADERS} ${ADD_HEADERS}
INCSDIR= ${INCLUDEDIR}/security
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.lib.mk>
diff --git a/lib/libpam/libpam/tests/Makefile b/lib/libpam/libpam/tests/Makefile
new file mode 100644
index 0000000..2ad64e2
--- /dev/null
+++ b/lib/libpam/libpam/tests/Makefile
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+OPENPAM = ${.CURDIR}/../../../../contrib/openpam
+.PATH: ${OPENPAM}/t
+
+TESTSDIR = ${TESTSBASE}/lib/libpam
+
+COMMONSRC = t_file.c t_main.c
+.for test in t_openpam_ctype t_openpam_readlinev t_openpam_readword
+TAP_TESTS_C += ${test}
+SRCS.${test} = ${test}.c ${COMMONSRC}
+.endfor
+CFLAGS +=-I${OPENPAM}/include -I${OPENPAM}/lib/libpam -I${OPENPAM}/t
+WARNS ?= 6
+
+DPADD = ${LIBPAM}
+LDADD = ${MINUSLPAM}
+
+.include <bsd.test.mk>
OpenPOWER on IntegriCloud