diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-08-05 08:03:11 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-08-05 08:03:11 +0000 |
commit | 72bcf614b2a5e5f281ca4372fa7dfccf1e6a3c43 (patch) | |
tree | ee1821fdda266c77a0f4ae403fe4358e7c45a47d /xtests/Makefile.am | |
parent | ea9255e046169e5d5b19370c9ae6292be5aacde0 (diff) | |
download | pam-72bcf614b2a5e5f281ca4372fa7dfccf1e6a3c43.tar.gz pam-72bcf614b2a5e5f281ca4372fa7dfccf1e6a3c43.tar.bz2 pam-72bcf614b2a5e5f281ca4372fa7dfccf1e6a3c43.zip |
Relevant BUGIDs:
Purpose of commit: new feature
Commit summary:
---------------
Add xtests to allow checks for PAM functions only doable in installed
system.
2006-08-05 Thorsten Kukuk <kukuk@thkukuk.de>
* configure.in: Generate xtests/Makefile.
* Makefile.am (SUBDIRS): Add xtests.
* README: Document make check and make xtests.
* xtests/Makefile.am: New.
* xtests/tst-pam_dispatch1.pamd: New.
* xtests/tst-pam_dispatch2.pamd: New.
* xtests/tst-pam_dispatch3.pamd: New.
* xtests/tst-pam_dispatch1.c: New.
* xtests/tst-pam_dispatch2.c: New.
* xtests/tst-pam_dispatch3.c: New.
Diffstat (limited to 'xtests/Makefile.am')
-rw-r--r-- | xtests/Makefile.am | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/xtests/Makefile.am b/xtests/Makefile.am new file mode 100644 index 00000000..622e3e59 --- /dev/null +++ b/xtests/Makefile.am @@ -0,0 +1,45 @@ +# +# Copyright (c) 2006 Thorsten Kukuk <kukuk@suse.de> +# + +AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_srcdir)/libpam/include +AM_LDFLAGS = -L$(top_builddir)/libpam -lpam + +CLEANFILES = *~ + +EXTRA_DIST = tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ + tst-pam_dispatch3.pamd + +XTESTS = tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 + +noinst_PROGRAMS = $(XTESTS) + +tst_pam_dispatch1_LDADD = -L$(top_builddir)/libpam -lpam -ldl -L$(top_builddir)/libpam_misc -lpam_misc +tst_pam_dispatch2_LDADD = -L$(top_builddir)/libpam -lpam -ldl -L$(top_builddir)/libpam_misc -lpam_misc +tst_pam_dispatch3_LDADD = -L$(top_builddir)/libpam -lpam -ldl -L$(top_builddir)/libpam_misc -lpam_misc + +xtests: $(XTESTS) + @failed=0; pass=0; all=0; \ + for testname in $(XTESTS) ; do \ + install -m 644 $$testname.pamd /etc/pam.d/$$testname ; \ + ./$$testname > /dev/null ; \ + if test $$? -ne 0 ; then \ + echo "FAIL: $$testname" ; \ + failed=`expr $$failed + 1`; \ + else \ + echo "PASS: $$testname" ; \ + pass=`expr $$pass + 1`; \ + fi ; \ + all=`expr $$all + 1` ; \ + rm -f /etc/pam.d/$$testname ; \ + done ; \ + if test "$$failed" -ne 0; then \ + echo "===================" ; \ + echo "$$failed of $$all tests failed" ; \ + echo "===================" ; \ + exit 1 ; \ + else \ + echo "==================" ; \ + echo "All $$all tests passed" ; \ + echo "==================" ; \ + fi |