diff options
author | Linus Nordberg <linus@nordu.net> | 2011-09-27 10:18:21 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-09-27 10:18:21 +0200 |
commit | 17082d27c58b53858c27d7e20079e427365d577a (patch) | |
tree | b35e6aec8319bb8dac9c593665c90f05f9637613 | |
parent | af81fa74d1920dcb2fee5cad950ba7552b580224 (diff) |
Add support for 'make check' and a dummy test.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rw-r--r-- | tests/t_fticks.c | 11 |
4 files changed, 24 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 2b51fc7..10fe5f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ AUTOMAKE_OPTIONS = foreign +SUBDIRS = tests + sbin_PROGRAMS = radsecproxy bin_PROGRAMS = catgconf noinst_LIBRARIES = librsp.a diff --git a/configure.ac b/configure.ac index 25db07c..24cbf05 100644 --- a/configure.ac +++ b/configure.ac @@ -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 +]) diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..9c0ce94 --- /dev/null +++ b/tests/Makefile.am @@ -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) diff --git a/tests/t_fticks.c b/tests/t_fticks.c new file mode 100644 index 0000000..71a015e --- /dev/null +++ b/tests/t_fticks.c @@ -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; +} |