summaryrefslogtreecommitdiff
path: root/tests/log
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-02-26 19:37:21 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-02-26 19:37:21 +0100
commit8bd489b482426eb8916588693f439668e873fed6 (patch)
treecfd9f50e441377d77b686632936b1f6e4fb8dd48 /tests/log
parent2f38c0fe02fa9485702c39668af21ebf5797bc6f (diff)
downloadwolfbones-8bd489b482426eb8916588693f439668e873fed6.tar.gz
wolfbones-8bd489b482426eb8916588693f439668e873fed6.tar.bz2
fixed test_log test
Diffstat (limited to 'tests/log')
-rw-r--r--tests/log/GNUmakefile29
-rw-r--r--tests/log/test_log.c14
2 files changed, 43 insertions, 0 deletions
diff --git a/tests/log/GNUmakefile b/tests/log/GNUmakefile
new file mode 100644
index 0000000..72e08cf
--- /dev/null
+++ b/tests/log/GNUmakefile
@@ -0,0 +1,29 @@
+TOPDIR = ..
+
+SUBDIRS = port daemon
+
+INCLUDE_LIBS = \
+ $(TOPDIR)/src/libwolf.a
+
+INCLUDE_DIRS = \
+ -I$(TOPDIR)/include/wolf -I.
+
+TEST_BINS = \
+ test_log$(EXE)
+
+test_log$(EXE): test_log.o
+
+-include $(TOPDIR)/makefiles/gmake/sub.mk
+
+testd: $(TOPDIR)/src/libwolf.a
+
+local_test:
+ @echo "Testing log.."
+ @./test_log >/dev/null 2>&1
+
+local_all:
+
+local_clean:
+ -rm -f test.log
+
+local_distclean:
diff --git a/tests/log/test_log.c b/tests/log/test_log.c
new file mode 100644
index 0000000..9af31a2
--- /dev/null
+++ b/tests/log/test_log.c
@@ -0,0 +1,14 @@
+#include "wolf/log.h" /* for logging */
+
+#include <stdlib.h> /* for exit, EXIT_SUCCESS, free */
+
+int main( void ) {
+ wolf_log_openlogtostderr( WOLF_LOG_NOTICE );
+ wolf_log_openlogtofile( "test.log", WOLF_LOG_NOTICE );
+#if defined HAVE_SYSLOG_H
+ wolf_log_openlogtosyslog( "test", WOLF_LOG_DAEMON, WOLF_LOG_NOTICE,
+ WOLF_LOG_SYSLOG_DEFAULT_OPTIONS );
+#endif
+
+ return EXIT_SUCCESS;
+}