noinst_PROGRAMS =
include_HEADERS =
nobase_include_HEADERS =
+check_PROGRAMS =
EXTRA_HEADERS =
BUILT_SOURCES=
EXTRA_DIST= \
include example/include.am
include support/include.am
+TESTS += ${check_PROGRAMS}
+
check-local: test-no-outputdiff
AC_CHECK_FUNCS([getline])
+PANDORA_HAVE_LIBGTEST
PANDORA_HAVE_LIBEVENT
PANDORA_REQUIRE_PTHREAD
PANDORA_CXX_DEMANGLE
PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
+if HAVE_LIBGTEST
+check_PROGRAMS += tests/unittests
+endif
+
if BUILD_LIBMEMCACHEDUTIL
TESTS_LDADDS+= libmemcached/libmemcachedutil.la
endif
noinst_LTLIBRARIES+= tests/libtest.la
tests_libtest_la_SOURCES= tests/test.c
+tests_unittests_SOURCES= \
+ tests/main.cc
+tests_unittests_LDADD= \
+ tests/libserver.la \
+ libmemcached/libmemcachedinternal.la \
+ ${TESTS_LDADDS} ${LTLIBGTEST}
+
tests_testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_testapp_SOURCES= tests/mem_functions.c
tests_testapp_DEPENDENCIES= \
--- /dev/null
+/* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ * Copyright (C) 2010 Monty Taylor
+ *
+ * All rights reserved.
+ *
+ * Use and distribution licensed under the BSD license. See
+ * the COPYING file in the parent directory for full text.
+ */
+
+#include "config.h"
+
+#include <gtest/gtest.h>
+
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}