modulesloadd_DATA = \
configs/tizen-modules-dlog-zero-copy.conf
-bin_SCRIPTS = dlog_test dlog_test_header dlog_test_daemon_early_quit dlog_test_tid_filtering_secure_logging dlog_cpu
+bin_SCRIPTS = dlog_test dlog_test_header dlog_test_daemon_early_quit dlog_test_tid_filtering_secure_logging dlog_test_backend_autodetection dlog_cpu
[dlog_test_header:tests/dlog_test_header.in]
[dlog_test_daemon_early_quit:tests/dlog_test_daemon_early_quit.in]
[dlog_test_tid_filtering_secure_logging:tests/dlog_test_tid_filtering_secure_logging.in]
+ [dlog_test_backend_autodetection:tests/dlog_test_backend_autodetection.in]
[dlog_cpu:tests/dlog_cpu.in]
[README.testsuite:tests/README.testsuite.in]
[units/dlog_logger.service]
%{_bindir}/dlog_test
%{_bindir}/dlog_test_header
%{_bindir}/dlog_test_daemon_early_quit
+%{_bindir}/dlog_test_backend_autodetection
%{_bindir}/dlog_test_tid_filtering_secure_logging
%{_bindir}/dlog_cpu
/usr/share/doc/dlog/README.testsuite
if [ "$quick" -ne 1 ]; then
if [ "$type" != "zero-copy" ]; then # Backend autodection and logger daemon stuff don't really work on zero-copy
- PREAUTODETECT_CONFIG_PATH=$DLOG_CONFIG_PATH
- DLOG_CONFIG_PATH="@datadir@/dlog-$type.conf.autodetect"
kill $LOGGER > /dev/null
sleep 1
- if [ "$type" = "logger" ]; then
- dlogutil -cb main
- fi
- dlog_logger -t 0 &
- LOGGER=$!
- sleep 1
-
- LOG_DETAILS="testing if backend autodetection works properly (1/2)"
- dlogsend -b main -t DLOG_AUTODETECT "xd" && ok || fail
- sleep 1
- DLOG_CONFIG_PATH=$PREAUTODETECT_CONFIG_PATH
- LOG_DETAILS="testing if backend autodetection works properly (2/2)"
- [ "$(dlogutil -db main -v raw)" = "xd" ] && ok || fail
+ dlog_test_backend_autodetection $type
- kill $LOGGER > /dev/null
- sleep 1
rm "$TESTDIR"/test*
+
dlog_logger -t 0 &
LOGGER=$!
sleep 1
sleep 1
fi
+ dlog_logger -t 0 &
+ LOGGER=$!
+ sleep 1
+
LOG_DETAILS="testing if the library works with multithreaded app"
dlogutil -f $TESTDIR/dlog_mt_test &
MT_TEST=$!
--- /dev/null
+#!/bin/sh
+
+source dlog_test_header
+
+trap cleanup 0
+
+if [ "$1" = "zero-copy" ]; then
+ echo "zero-copy not supported for this test"
+ exit 1
+fi
+
+PREAUTODETECT_CONFIG_PATH=$DLOG_CONFIG_PATH
+export DLOG_CONFIG_PATH="@datadir@/dlog-$type.conf.autodetect"
+TESTDIR=/var/lib/dlog-tests
+
+if [ "$type" = "logger" ]; then
+ dlogutil -cb main
+fi
+dlog_logger -t 0 &
+LOGGER=$!
+sleep 1
+
+LOG_DETAILS="testing if backend autodetection works properly (1/2)"
+dlogsend -b main -t DLOG_AUTODETECT "xd" && ok || fail
+sleep 1
+
+export DLOG_CONFIG_PATH=$PREAUTODETECT_CONFIG_PATH
+LOG_DETAILS="testing if backend autodetection works properly (2/2)"
+[ "$(dlogutil -db main -v raw)" = "xd" ] && ok || fail
+
+kill $LOGGER > /dev/null
+sleep 1
\ No newline at end of file