From ef5fb2800153fc05d19df202e4ee182fb72f1d86 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 Mar 2015 13:26:52 +0100 Subject: logger: add -DTEST_LOGGER "make test_logger" now compiles logger(1) test program to overwrite system datetime stuff, hostname and PID, for example: export TZ=GMT export LOGGER_TEST_TIMEOFDAY=1234567890.123456 export LOGGER_TEST_HOSTNAME=foo export LOGGER_TEST_GETPID=123 ./test_logger --rfc5424 --no-act --stderr -i --tag MyTag mesg <13>1 2009-02-13T23:31:30.123456+00:00 foo MyTag 123 - [timeQuality tzKnown="1" isSynced="0"] mesg if the LOGGER_TEST_* variables are not specified then default to standard logger(1) behavior. Note that it would be possible to use for example "unshare --utc" to make hostname stable and portable, but LOGGER_TEST_* variables allow to keep the tests less complex. Signed-off-by: Karel Zak --- tests/commands.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/commands.sh') diff --git a/tests/commands.sh b/tests/commands.sh index e11bd2ab2..fd07b175d 100644 --- a/tests/commands.sh +++ b/tests/commands.sh @@ -17,6 +17,7 @@ TS_HELPER_LIBMOUNT_DEBUG="$top_builddir/test_mount_debug" TS_HELPER_PYLIBMOUNT_CONTEXT="$top_srcdir/libmount/python/test_mount_context.py" TS_HELPER_PYLIBMOUNT_TAB="$top_srcdir/libmount/python/test_mount_tab.py" TS_HELPER_PYLIBMOUNT_UPDATE="$top_srcdir/libmount/python/test_mount_tab_update.py" +TS_HELPER_LOGGER="$top_builddir/test_logger" TS_HELPER_LOGINDEFS="$top_builddir/test_logindefs" TS_HELPER_MD5="$top_builddir/test_md5" TS_HELPER_MORE=${TS_HELPER_MORE-"$top_builddir/test_more"} -- cgit v1.2.3-55-g7522