Makefile.am: added unit tests for the archive plugins
This commit is contained in:
parent
efc885a9dc
commit
a0384aaead
|
@ -55,3 +55,4 @@ test/run_input
|
||||||
test/read_mixer
|
test/read_mixer
|
||||||
test/dump_playlist
|
test/dump_playlist
|
||||||
test/run_normalize
|
test/run_normalize
|
||||||
|
test/tmp
|
||||||
|
|
14
Makefile.am
14
Makefile.am
|
@ -755,6 +755,8 @@ sparse-check:
|
||||||
|
|
||||||
if ENABLE_TEST
|
if ENABLE_TEST
|
||||||
|
|
||||||
|
TESTS =
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
test/read_conf \
|
test/read_conf \
|
||||||
test/run_input \
|
test/run_input \
|
||||||
|
@ -974,6 +976,18 @@ test_read_mixer_SOURCES = test/read_mixer.c \
|
||||||
src/fd_util.c \
|
src/fd_util.c \
|
||||||
$(MIXER_SRC)
|
$(MIXER_SRC)
|
||||||
|
|
||||||
|
if ENABLE_BZIP2_TEST
|
||||||
|
TESTS += test/test_archive_bzip2.sh
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_ZZIP_TEST
|
||||||
|
TESTS += test/test_archive_zzip.sh
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_ISO9660_TEST
|
||||||
|
TESTS += test/test_archive_iso9660.sh
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -80,6 +80,7 @@ ver 0.16 (20??/??/??)
|
||||||
* CUE sheet support
|
* CUE sheet support
|
||||||
* obey $(sysconfdir) for default mpd.conf location
|
* obey $(sysconfdir) for default mpd.conf location
|
||||||
* build with large file support by default
|
* build with large file support by default
|
||||||
|
* added test suite ("make check")
|
||||||
* require GLib 2.12
|
* require GLib 2.12
|
||||||
|
|
||||||
|
|
||||||
|
|
18
configure.ac
18
configure.ac
|
@ -353,8 +353,14 @@ fi
|
||||||
AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
|
AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
|
||||||
if test x$enable_bzip2 = xyes; then
|
if test x$enable_bzip2 = xyes; then
|
||||||
AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
|
AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
|
||||||
|
|
||||||
|
AC_PATH_PROG(BZIP2, bzip2, no)
|
||||||
|
else
|
||||||
|
BZIP2="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(ENABLE_BZIP2_TEST, test x$BZIP2 != xno)
|
||||||
|
|
||||||
dnl zzip
|
dnl zzip
|
||||||
AC_ARG_ENABLE(zzip,
|
AC_ARG_ENABLE(zzip,
|
||||||
AS_HELP_STRING([--enable-zzip],
|
AS_HELP_STRING([--enable-zzip],
|
||||||
|
@ -367,8 +373,14 @@ MPD_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13],
|
||||||
AM_CONDITIONAL(HAVE_ZZIP, test x$enable_zzip = xyes)
|
AM_CONDITIONAL(HAVE_ZZIP, test x$enable_zzip = xyes)
|
||||||
if test x$enable_zzip = xyes; then
|
if test x$enable_zzip = xyes; then
|
||||||
AC_DEFINE(HAVE_ZZIP, 1, [Define to have zip archive support])
|
AC_DEFINE(HAVE_ZZIP, 1, [Define to have zip archive support])
|
||||||
|
|
||||||
|
AC_PATH_PROG(ZIP, zip, no)
|
||||||
|
else
|
||||||
|
ZIP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(ENABLE_ZZIP_TEST, test x$ZIP != xno)
|
||||||
|
|
||||||
dnl iso9660
|
dnl iso9660
|
||||||
AC_ARG_ENABLE(iso9660,
|
AC_ARG_ENABLE(iso9660,
|
||||||
AS_HELP_STRING([--enable-iso9660],
|
AS_HELP_STRING([--enable-iso9660],
|
||||||
|
@ -381,8 +393,14 @@ MPD_AUTO_PKG(iso9660, ISO9660, [libiso9660],
|
||||||
AM_CONDITIONAL(HAVE_ISO9660, test x$enable_iso9660 = xyes)
|
AM_CONDITIONAL(HAVE_ISO9660, test x$enable_iso9660 = xyes)
|
||||||
if test x$enable_iso9660 = xyes; then
|
if test x$enable_iso9660 = xyes; then
|
||||||
AC_DEFINE(HAVE_ISO9660, 1, [Define to have ISO9660 archive support])
|
AC_DEFINE(HAVE_ISO9660, 1, [Define to have ISO9660 archive support])
|
||||||
|
|
||||||
|
AC_PATH_PROG(MKISOFS, mkisofs, no)
|
||||||
|
else
|
||||||
|
MKISOFS="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(ENABLE_ISO9660_TEST, test x$MKISOFS != xno)
|
||||||
|
|
||||||
dnl archive API
|
dnl archive API
|
||||||
if
|
if
|
||||||
test x$enable_bzip2 = xyes ||
|
test x$enable_bzip2 = xyes ||
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
SRC_BASE=configure
|
||||||
|
SRC="$(dirname $0)/../${SRC_BASE}"
|
||||||
|
DST="$(pwd)/test/tmp/${SRC_BASE}.bz2"
|
||||||
|
|
||||||
|
mkdir -p test/tmp
|
||||||
|
rm -f "$DST"
|
||||||
|
bzip2 -c "$SRC" >"$DST"
|
||||||
|
./test/run_input "$DST/${SRC_BASE}" |diff "$SRC" -
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
SRC_BASE=configure
|
||||||
|
SRC="$(dirname $0)/../${SRC_BASE}"
|
||||||
|
DST="$(pwd)/test/tmp/${SRC_BASE}.iso"
|
||||||
|
|
||||||
|
mkdir -p test/tmp
|
||||||
|
rm -f "$DST"
|
||||||
|
mkisofs -quiet -l -o "$DST" "$SRC"
|
||||||
|
./test/run_input "$DST/${SRC_BASE}" |diff "$SRC" -
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
SRC_BASE=configure
|
||||||
|
SRC="$(dirname $0)/../${SRC_BASE}"
|
||||||
|
DST="$(pwd)/test/tmp/${SRC_BASE}.zip"
|
||||||
|
|
||||||
|
mkdir -p test/tmp
|
||||||
|
rm -f "$DST"
|
||||||
|
zip --quiet --junk-paths "$DST" "$SRC"
|
||||||
|
./test/run_input "$DST/${SRC_BASE}" |diff "$SRC" -
|
Loading…
Reference in New Issue