src/shared/logcommon.c \
src/logctrl/logctrl.c
+usrlibexeclibdlogdir = /usr/libexec/libdlog
+
+usrlibexeclibdlog_PROGRAMS = test_libdlog
+test_libdlog_CFLAGS = \
+ $(AM_CFLAGS) \
+ -fPIE
+
+test_libdlog_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -pie
+
+test_libdlog_DEPENDENCIES = \
+ libdlog.la
+
+test_libdlog_LDADD = \
+ libdlog.la
+
+test_libdlog_SOURCES = \
+ tests/test_libdlog.c
+
+usrlibexeclibdlog_PROGRAMS += perf_libdlog
+perf_libdlog_CFLAGS = \
+ $(AM_CFLAGS) \
+ -fPIE
+
+perf_libdlog_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -pie
+
+perf_libdlog_DEPENDENCIES = \
+ libdlog.la
+
+perf_libdlog_LDADD = \
+ libdlog.la
+
+perf_libdlog_SOURCES = \
+ tests/performance_test.c
+
TESTS = \
src/tests/test_ptrs_list \
src/tests/config \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dlog.pc
+data_DATA = configs/dlog.conf.test
+
+bin_SCRIPTS = dlog_test_pipe
+
dox::
doxygen
--- /dev/null
+# Lines starting with # are comments and are ignored.
+# Empty lines are also ignored.
+# Every other line is a config value and has to be in key=value format
+
+backend=pipe
+
+##### Settings used by the logging library
+
+# Platform logging. Whether logging happens at all.
+plog=1
+
+# Debugmode - whether write platform debug log or not
+debugmode=1
+
+# Limiter - whether it's enabled and the rules (check the documentation for how to create rules).
+limiter=0
+limiter|*|*=allow
+
+##### Settings used by the logging daemon
+
+# Sockets that all programs connect to to receive a logging pipe.
+main_write_sock=/tmp/dlog_tests/main.wr
+apps_write_sock=/tmp/dlog_tests/apps.wr
+system_write_sock=/tmp/dlog_tests/system.wr
+radio_write_sock=/tmp/dlog_tests/radio.wr
+kmsg_write_sock=/tmp/dlog_tests/kmsg.wr
+syslog_write_sock=/tmp/dlog_tests/syslog.wr
+
+# Sockets that administrative programs connect to to manipulate the daemon.
+main_ctl_sock=/tmp/dlog_tests/main.ctl
+apps_ctl_sock=/tmp/dlog_tests/apps.ctl
+system_ctl_sock=/tmp/dlog_tests/system.ctl
+radio_ctl_sock=/tmp/dlog_tests/radio.ctl
+kmsg_ctl_sock=/tmp/dlog_tests/kmsg.ctl
+syslog_ctl_sock=/tmp/dlog_tests/syslog.ctl
+
+# Permissions for the relevant sockets.
+main_write_sock_rights=0222
+apps_write_sock_rights=0222
+system_write_sock_rights=0222
+radio_write_sock_rights=0222
+kmsg_write_sock_rights=0222
+syslog_write_sock_rights=0222
+
+main_ctl_sock_rights=0222
+apps_ctl_sock_rights=0222
+system_ctl_sock_rights=0222
+radio_ctl_sock_rights=0222
+kmsg_ctl_sock_rights=0222
+syslog_ctl_sock_rights=0222
+
+main_write_sock_owner=log
+apps_write_sock_owner=log
+system_write_sock_owner=log
+radio_write_sock_owner=log
+kmsg_write_sock_owner=log
+syslog_write_sock_owner=log
+
+main_ctl_sock_owner=log
+apps_ctl_sock_owner=log
+system_ctl_sock_owner=log
+radio_ctl_sock_owner=log
+kmsg_ctl_sock_owner=log
+syslog_ctl_sock_owner=log
+
+main_write_sock_group=log
+apps_write_sock_group=log
+system_write_sock_group=log
+radio_write_sock_group=log
+kmsg_write_sock_group=log
+syslog_write_sock_group=log
+
+main_ctl_sock_group=log
+apps_ctl_sock_group=log
+system_ctl_sock_group=log
+radio_ctl_sock_group=log
+kmsg_ctl_sock_group=log
+syslog_ctl_sock_group=log
+
+main_size=1048576
+apps_size=1048576
+system_size=1048576
+radio_size=1048576
+kmsg_size=1048576
+syslog_size=1048576
+
+util_sorting_time_window=5000
+util_sorting_buffer_size=32000
Source0: %{name}-%{version}.tar.gz
Source101: packaging/dlogutil.manifest
Source102: packaging/libdlog.manifest
-Source104: packaging/dlogbackend-logger.manifest
+Source103: packaging/dlog-tests.manifest
+Source104: packaging/dlogbackend-logger.manifest
Source301: packaging/dlog_logger.service
Source302: packaging/dlog_logger.path
Source501: packaging/01-dlog.rules
%description -n dlog-doc
Documentation for dlog
+%package -n dlog-tests
+Summary: dlog integration tests
+
+%description -n dlog-tests
+Integration tests for dlog.
+
%prep
%setup -q
cp %{SOURCE101} .
cp %{SOURCE102} .
+cp %{SOURCE103} .
cp %{SOURCE104} .
+
%autogen --disable-static
%configure --disable-static \
TZ_SYS_ETC=%{TZ_SYS_ETC}
%make_install
mkdir -p %{buildroot}/usr/bin/
-
mkdir -p %{buildroot}/usr/share/doc/dlog
cp -r documentation/* %{buildroot}/usr/share/doc/dlog
%files -n dlog-doc
/usr/share/doc/dlog
+
+%files -n dlog-tests
+%manifest dlog-tests.manifest
+%{_bindir}/dlog_test_pipe
+%{_libexecdir}/libdlog/perf_libdlog
+%{_libexecdir}/libdlog/test_libdlog
+%{_datadir}/dlog.conf.test