summaryrefslogtreecommitdiff
path: root/common/elapi/elapi_test
diff options
context:
space:
mode:
Diffstat (limited to 'common/elapi/elapi_test')
-rw-r--r--common/elapi/elapi_test/Makefile.am14
-rw-r--r--common/elapi/elapi_test/elapi_ut.conf27
2 files changed, 36 insertions, 5 deletions
diff --git a/common/elapi/elapi_test/Makefile.am b/common/elapi/elapi_test/Makefile.am
index b16102c8..cac0ead6 100644
--- a/common/elapi/elapi_test/Makefile.am
+++ b/common/elapi/elapi_test/Makefile.am
@@ -5,7 +5,8 @@ topdir=$(srcdir)/../..
AM_CFLAGS = -DELAPI_DEFAULT_CONFIG_DIR=\"$(srcdir)\" \
-DELAPI_DEFAULT_CONFIG_APP_DIR=\"$(srcdir)\" \
-DELAPI_DEFAULT_APP_NAME=\"elapi_ut\" \
- -DELAPI_DEFAULT_APP_NAME_SIZE=127
+ -DELAPI_DEFAULT_APP_NAME_SIZE=127 \
+ -DELAPI_UTEST
if HAVE_GCC
AM_CFLAGS += \
@@ -13,26 +14,31 @@ if HAVE_GCC
-Wcast-align -Wwrite-strings
endif
-AM_CPPFLAGS = -I$(topdir) -I$(topdir)/ini -I$(topdir)/trace -I$(topdir)/collection -I$(topdir)/elapi $(TRACE_LEVEL)
+AM_CPPFLAGS = -I$(topdir) -I$(topdir)/ini -I$(topdir)/trace -I$(topdir)/collection -I$(topdir)/elapi \
+ -I$(topdir)/elapi/providers/file $(TRACE_LEVEL)
ACLOCAL_AMFLAGS = -I m4
# Build library
noinst_LTLIBRARIES = libelapi_test.la
+
libelapi_test_la_SOURCES = \
../elapi_event.c \
../elapi_log.c \
../elapi_internal.c \
+ ../elapi_sink.c \
../elapi_event.h \
../elapi_priv.h \
../elapi_sink.h \
../elapi_log.h \
../elapi_async.h \
- ../elapi.h
+ ../elapi.h \
+ ../providers/file/file_provider.c \
+ ../providers/file/file_provider.h
# Build unit test
check_PROGRAMS = elapi_ut
elapi_ut_SOURCES = elapi_ut.c
-elapi_ut_LDADD = libelapi_test.la ../../ini/libini_config.la ../../collection/libcollection.la
+elapi_ut_LDADD = libelapi_test.la ../../ini/libini_config.la ../../collection/libcollection.la -ldl
TESTS = elapi_ut
diff --git a/common/elapi/elapi_test/elapi_ut.conf b/common/elapi/elapi_test/elapi_ut.conf
index d15a4550..a5ad7a0b 100644
--- a/common/elapi/elapi_test/elapi_ut.conf
+++ b/common/elapi/elapi_test/elapi_ut.conf
@@ -79,19 +79,44 @@ sinks = logfile, syslog
; In this case the ELAPI will try to load shared library with the name
; constructed using specified value. In the given example
; ELAPI will try to load libelapi_sink_custom_audit.so library.
-; The general pattern is: libelapi_sink_<source>.so
+; The general pattern is: libelapi_sink_<provider>.so
+;
+; required - (optional)
+; Defines whether it is a required sink?
+; If not present the dispatcher will return error at load time.
+;
+; onerror - if the sink got an error what should dispatcher do?
+; 0 - retry (default)
+; 1 - disable
+;
+; timeout - for how long one should wait before trying to revive the sink
+; default is 60 seconds
+;
+; synch - yes/no (default no) - a flag that forces the sink to act synchronously
+; even if it can support async operations
[debugfile]
provider=file
+required=true
+onerror=1
+timeout=90
[logfile]
provider=file
+required=true
+onerror=0
+timeout=60
[auditfile]
provider=file
+required=true
+onerror=1
+timeout=90
[stderr]
provider=stderr
+synch=false
[syslog]
provider=syslog
+synch=yes