diff options
author | ngie <ngie@FreeBSD.org> | 2017-02-09 22:14:17 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-02-09 22:14:17 +0000 |
commit | 72ef9ff5b96eef28f0024f16157bf47833200e6d (patch) | |
tree | 64d62c7cae3ddd64c4c86b3836ae49f9adf96596 | |
parent | 26a774214d8d03cd6f66b1ba20979ab10fc4bbcd (diff) | |
download | FreeBSD-src-72ef9ff5b96eef28f0024f16157bf47833200e6d.zip FreeBSD-src-72ef9ff5b96eef28f0024f16157bf47833200e6d.tar.gz |
MFC r274138,r274149:
r274138 (by des):
Hook up OpenPAM's own unit tests to the build.
r274149 (by markj):
Create a directory for the PAM tests.
-rw-r--r-- | etc/mtree/BSD.tests.dist | 2 | ||||
-rw-r--r-- | lib/libpam/libpam/Makefile | 4 | ||||
-rw-r--r-- | lib/libpam/libpam/tests/Makefile | 19 |
3 files changed, 25 insertions, 0 deletions
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 80c9461..8e0beeb 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -310,6 +310,8 @@ .. libnv .. + libpam + .. librt .. libthr diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index 105748e..cfbe480 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -198,4 +198,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> |