Merge pull request #157 from sureshsundriyal/wip

Fix the tests when not compiled with bz2 support.
This commit is contained in:
Tim Stack 2015-03-28 12:11:03 -07:00
commit fdcb75d198
8 changed files with 31 additions and 16 deletions

View File

@ -249,6 +249,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BZIP2_CMD = @BZIP2_CMD@ BZIP2_CMD = @BZIP2_CMD@
BZIP2_SUPPORT = @BZIP2_SUPPORT@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@ -13,6 +13,10 @@ export top_builddir
test_dir="@abssrcdir@/test" test_dir="@abssrcdir@/test"
export test_dir export test_dir
# Let the tests know whether bzip is supported or not.
BZIP2_SUPPORT="@BZIP2_SUPPORT@"
export BZIP2_SUPPORT
BZIP2_CMD="@BZIP2_CMD@" BZIP2_CMD="@BZIP2_CMD@"
export BZIP2_CMD export BZIP2_CMD

6
configure vendored
View File

@ -640,6 +640,7 @@ PCRE_LIBS
CURSES_LIB CURSES_LIB
HAVE_LOCAL_YAJL HAVE_LOCAL_YAJL
jemalloch jemalloch
BZIP2_SUPPORT
EGREP EGREP
GREP GREP
CPP CPP
@ -5965,9 +5966,12 @@ $as_echo "$ac_cv_search_BZ2_bzopen" >&6; }
ac_res=$ac_cv_search_BZ2_bzopen ac_res=$ac_cv_search_BZ2_bzopen
if test "$ac_res" != no; then : if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
BZIP2_SUPPORT=1
else
BZIP2_SUPPORT=0
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; } $as_echo_n "checking for library containing dlopen... " >&6; }
if ${ac_cv_search_dlopen+:} false; then : if ${ac_cv_search_dlopen+:} false; then :

View File

@ -83,7 +83,10 @@ AC_STRUCT_TIMEZONE
AC_SEARCH_LIBS(openpty, util) AC_SEARCH_LIBS(openpty, util)
AC_SEARCH_LIBS(gzseek, z, [], [AC_MSG_ERROR([libz required to build])]) AC_SEARCH_LIBS(gzseek, z, [], [AC_MSG_ERROR([libz required to build])])
AC_SEARCH_LIBS(BZ2_bzopen, bz2) AC_SEARCH_LIBS(BZ2_bzopen, bz2,
AS_VAR_SET(BZIP2_SUPPORT, 1),
AS_VAR_SET(BZIP2_SUPPORT, 0))
AC_SUBST(BZIP2_SUPPORT)
AC_SEARCH_LIBS(dlopen, dl) AC_SEARCH_LIBS(dlopen, dl)
AC_SEARCH_LIBS(backtrace, execinfo) AC_SEARCH_LIBS(backtrace, execinfo)

View File

@ -336,6 +336,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BZIP2_CMD = @BZIP2_CMD@ BZIP2_CMD = @BZIP2_CMD@
BZIP2_SUPPORT = @BZIP2_SUPPORT@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@ -545,6 +545,7 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BZIP2_CMD = @BZIP2_CMD@ BZIP2_CMD = @BZIP2_CMD@
BZIP2_SUPPORT = @BZIP2_SUPPORT@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@

View File

@ -112,6 +112,7 @@ int main(int argc, char *argv[])
} }
else { else {
//printf("%s %s\n", lf.get_format()->get_name().c_str(), expected_format.c_str()); //printf("%s %s\n", lf.get_format()->get_name().c_str(), expected_format.c_str());
assert(lf.get_format() != NULL);
assert(lf.get_format()->get_name() == expected_format); assert(lf.get_format()->get_name() == expected_format);
} }
if (!lf.is_compressed()) { if (!lf.is_compressed()) {

View File

@ -52,7 +52,7 @@ Dec 03 09:23:38 2006 -- 000
Jan 03 09:47:02 2007 -- 000 Jan 03 09:47:02 2007 -- 000
EOF EOF
if test x"$BZIP2_CMD" != x""; then if test "$BZIP2_SUPPORT" -eq 1 -a test x"$BZIP2_CMD" != x""; then
$BZIP2_CMD -z -c "${srcdir}/logfile_syslog.1" > logfile_syslog.1.bz2 $BZIP2_CMD -z -c "${srcdir}/logfile_syslog.1" > logfile_syslog.1.bz2
touch -t 200711030923 logfile_syslog.1.bz2 touch -t 200711030923 logfile_syslog.1.bz2