summaryrefslogtreecommitdiffstats
path: root/tests/commands.sh
diff options
context:
space:
mode:
authorKarel Zak2015-03-16 13:26:52 +0100
committerKarel Zak2015-03-16 14:01:53 +0100
commitef5fb2800153fc05d19df202e4ee182fb72f1d86 (patch)
tree69dc193182d6db4bfa663772261bdcc765ebddcb /tests/commands.sh
parentlogger: add --no-act for testing (diff)
downloadkernel-qcow2-util-linux-ef5fb2800153fc05d19df202e4ee182fb72f1d86.tar.gz
kernel-qcow2-util-linux-ef5fb2800153fc05d19df202e4ee182fb72f1d86.tar.xz
kernel-qcow2-util-linux-ef5fb2800153fc05d19df202e4ee182fb72f1d86.zip
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 <kzak@redhat.com>
Diffstat (limited to 'tests/commands.sh')
-rw-r--r--tests/commands.sh1
1 files changed, 1 insertions, 0 deletions
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"}