From de60f1cf297bca3d35867631219f120f8990fa92 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Feb 2017 22:14:17 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.freebsd.org/base/stable/10@313487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- etc/mtree/BSD.tests.dist | 2 ++ lib/libpam/libpam/Makefile | 4 ++++ lib/libpam/libpam/tests/Makefile | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 lib/libpam/libpam/tests/Makefile diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 80c946110..8e0beeb04 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 105748e1a..cfbe4805c 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 diff --git a/lib/libpam/libpam/tests/Makefile b/lib/libpam/libpam/tests/Makefile new file mode 100644 index 000000000..2ad64e289 --- /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 -- 2.42.0