Permalink
Browse files

Run tests via `make check`

  • Loading branch information...
1 parent b905bd0 commit 3c4bd70d279f230665a2fcc6a9f2284501db1cb7 @jonm committed Nov 17, 2015
Showing with 10 additions and 1 deletion.
  1. +3 −1 configure.ac
  2. +7 −0 src/Makefile.am
View
@@ -20,7 +20,9 @@ AC_CHECK_HEADERS([criterion/criterion.h],[],[
AC_MSG_WARN(unit tests will not be runnable without Criterion library)
AC_MSG_WARN(See https://github.com/Snaipe/Criterion/)
])
-AC_CHECK_LIB(criterion,extmatch,[],[
+AC_CHECK_LIB(criterion,extmatch,[
+ AC_MSG_RESULT(yes)
+],[
AC_MSG_WARN(unit tests will not be runnable without Criterion library)
AC_MSG_WARN(See https://github.com/Snaipe/Criterion/)
])
View
@@ -1,6 +1,7 @@
## Process this file with automake to produce Makefile.in
AM_CFLAGS = -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES
+# main program
bin_PROGRAMS = dmserver
common_sources = comm.c act.comm.c act.info.c act.move.c act.obj1.c \
act.obj2.c act.off.c act.other.c act.social.c act.wizard.c handler.c \
@@ -12,3 +13,9 @@ common_sources = comm.c act.comm.c act.info.c act.move.c act.obj1.c \
create.c bsd.c parser.c intrinsics.c
dmserver_SOURCES = $(common_sources) main.c
+# unit tests
+check_PROGRAMS = tests
+tests_SOURCES = $(common_sources) test.act.wizard.c
+tests_LDADD = -lcriterion
+TESTS = tests
+

0 comments on commit 3c4bd70

Please sign in to comment.