svn commit: r274138 - in head/lib/libpam/libpam: . tests

Dag-Erling Smørgrav des at FreeBSD.org
Wed Nov 5 16:13:43 UTC 2014


Author: des
Date: Wed Nov  5 16:13:42 2014
New Revision: 274138
URL: https://svnweb.freebsd.org/changeset/base/274138

Log:
  Hook up OpenPAM's own unit tests to the build.

Added:
  head/lib/libpam/libpam/tests/
  head/lib/libpam/libpam/tests/Makefile   (contents, props changed)
Modified:
  head/lib/libpam/libpam/Makefile

Modified: head/lib/libpam/libpam/Makefile
==============================================================================
--- head/lib/libpam/libpam/Makefile	Wed Nov  5 15:32:57 2014	(r274137)
+++ head/lib/libpam/libpam/Makefile	Wed Nov  5 16:13:42 2014	(r274138)
@@ -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>

Added: head/lib/libpam/libpam/tests/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libpam/libpam/tests/Makefile	Wed Nov  5 16:13:42 2014	(r274138)
@@ -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>


More information about the svn-src-all mailing list