Skip to content

Commit

Permalink
Add support for 'make check' and a dummy test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Nordberg committed Sep 27, 2011
1 parent af81fa7 commit 17082d2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
AUTOMAKE_OPTIONS = foreign

SUBDIRS = tests

sbin_PROGRAMS = radsecproxy
bin_PROGRAMS = catgconf
noinst_LIBRARIES = librsp.a
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,7 @@ AM_CONDITIONAL(HAVE_DOCBOOK2X_MAN, test "$DOCBOOK2X_MAN" = "yes")
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LDFLAGS)
AX_CHECK_SSL
AC_OUTPUT(Makefile)
AC_OUTPUT([
Makefile
tests/Makefile
])
7 changes: 7 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
check_PROGRAMS = t_fticks

AM_CFLAGS = -g -Wall -Werror @TARGET_CFLAGS@
AM_LDFLAGS = @SSL_LDFLAGS@ @TARGET_LDFLAGS@
LDADD = $(top_builddir)/librsp.a @SSL_LIBS@

TESTS = $(check_PROGRAMS)
11 changes: 11 additions & 0 deletions tests/t_fticks.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "../radsecproxy.h"
#include "../fticks.h"

int
main (int argc, char *argv[])
{
uint8_t buf[128];

fticks_hashmac((const uint8_t *) "xyzzy", NULL, sizeof(buf), buf);
return 0;
}

0 comments on commit 17082d2

Please sign in to comment.