mirror of
https://github.com/tstack/lnav.git
synced 2024-10-26 21:19:54 +03:00
[tests] add a test for decompression
This commit is contained in:
parent
678be94d75
commit
8851c4492f
@ -23,6 +23,9 @@ export BZIP2_SUPPORT
|
||||
BZIP2_CMD="@BZIP2_CMD@"
|
||||
export BZIP2_CMD
|
||||
|
||||
XZ_CMD="@XZ_CMD@"
|
||||
export XZ_CMD
|
||||
|
||||
LIBARCHIVE_LIBS="@LIBARCHIVE_LIBS@"
|
||||
export LIBARCHIVE_LIBS
|
||||
|
||||
|
@ -82,6 +82,7 @@ AC_PROG_MAKE_SET
|
||||
AC_PATH_PROG(BZIP2_CMD, [bzip2])
|
||||
AC_PATH_PROG(RE2C_CMD, [re2c])
|
||||
AM_CONDITIONAL(HAVE_RE2C, test x"$RE2C_CMD" != x"")
|
||||
AC_PATH_PROG(XZ_CMD, [xz])
|
||||
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
|
@ -364,6 +364,7 @@ DISTCLEANFILES = \
|
||||
*.tmp \
|
||||
*.gz \
|
||||
*.bz2 \
|
||||
*.xz \
|
||||
hw.txt \
|
||||
hw2.txt \
|
||||
reload_test.0 \
|
||||
|
@ -38,6 +38,20 @@ EOF
|
||||
fi
|
||||
|
||||
if test x"${LIBARCHIVE_LIBS}" != x""; then
|
||||
if test x"${XZ_CMD}" != x""; then
|
||||
${XZ_CMD} -z -c ${srcdir}/logfile_syslog.1 > logfile_syslog.1.xz
|
||||
|
||||
run_test env TMPDIR=tmp ${lnav_test} -n \
|
||||
logfile_syslog.1.xz
|
||||
|
||||
check_output "decompression not working" <<EOF
|
||||
Dec 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
|
||||
Dec 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
|
||||
Dec 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
|
||||
Jan 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
|
||||
EOF
|
||||
fi
|
||||
|
||||
(cd ${srcdir} && tar cfz ${builddir}/test-logs.tgz logfile_access_log.* logfile_empty.0 -C ${builddir} ../src/lnav)
|
||||
|
||||
dd if=test-logs.tgz of=test-logs-trunc.tgz bs=4096 count=20
|
||||
|
Loading…
Reference in New Issue
Block a user