From 9a22fc0753f25f5fe79a3764533e69dacd483fc0 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Wed, 27 Aug 2014 09:46:04 +0200 Subject: [PATCH] add beginnings of a second test --- .gitignore | 15 ++++++++++----- tests/Makefile.am | 7 ++++--- tests/util_test.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 tests/util_test.c diff --git a/.gitignore b/.gitignore index 862ccf0..8404a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -27,17 +27,22 @@ m4/lt~obsolete.m4 missing pam_yubico-*.tar.gz pam_yubico-*.tar.gz.sig -test-suite.log -test.log -test.trs pam_yubico.8 ykpamcfg.1 drop_privs.lo libpam_util.la pam_yubico.la pam_yubico.lo -tests/test -tests/test.o util.lo ykpamcfg ykpamcfg.o +tests/test +tests/test.o +tests/util_test +tests/util_test-util_test.o +tests/util_test.log +tests/util_test.o +tests/util_test.trs +tests/test-suite.log +tests/test.log +tests/test.trs diff --git a/tests/Makefile.am b/tests/Makefile.am index d28f31e..2681819 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,8 +29,9 @@ AM_LDFLAGS = -no-install AM_CFLAGS=-I$(srcdir)/.. $(WARN_CFLAGS) -LDADD = ../pam_yubico.la -test_SOURCES = test.c +test_LDADD = ../pam_yubico.la +util_test_LDADD = ../libpam_util.la +util_test_CPPFLAGS = @YKPERS_CFLAGS@ -check_PROGRAMS = test +check_PROGRAMS = test util_test TESTS = $(check_PROGRAMS) diff --git a/tests/util_test.c b/tests/util_test.c new file mode 100644 index 0000000..ee8f57a --- /dev/null +++ b/tests/util_test.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2014 Yubico AB + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include "util.h" + +int +main (int argc, char **argv) +{ + return 0; +}