Build and check all tests from tests/ subdirectory in the make check target

master
Ondřej Surý 2013-04-22 11:09:08 +02:00
parent 8f475527ec
commit 5b5f365499
6 changed files with 359 additions and 5 deletions

122
.gitignore vendored
View File

@ -1,6 +1,7 @@
syntax: glob
*~
*.[ao]
.dirstamp
Makefile
CMakeCache.txt
@ -27,6 +28,7 @@ Makefile.in
/configure
/libtool
/config/ar-lib
/config/compile
/config/config.guess
/config/config.sub
/config/depcomp
@ -69,3 +71,123 @@ Makefile.in
/src/testac
/src/testtr
/src/webpng
# Tests artifacts
tests/a.png
tests/bmp_im2im_dst.bmp
tests/bmp_im2im_src.bmp
tests/bug00132.c_35_diff.png
tests/bug00132.c_35_out.png
tests/bug00181.gif
tests/bug00181a.gif
tests/bug00227.gif
tests/gd2_im2im_dst.gd2
tests/gd2_im2im_src.gd2
tests/gd_im2im_dst.gd
tests/gd_im2im_src.gd
tests/gdimageline_aa.c_38_diff.png
tests/gdimageline_aa.c_38_out.png
tests/gdimagestringft_bbox.png
tests/gif_im2im_dst.gif
tests/gif_im2im_src.gif
tests/jpeg_im2im_dst.jpeg
tests/jpeg_im2im_src.jpeg
tests/jpeg_read.c_25_diff.png
tests/jpeg_read.c_25_out.png
tests/png_im2im_dst.png
tests/png_im2im_src.png
tests/tiff_im2im_dst.tiff
tests/tiff_im2im_src.tiff
tests/wbmp/wbmp_im2im_dst.wbmp
tests/wbmp/wbmp_im2im_src.wbmp
tests/wbmp_im2im_dst.wbmp
tests/wbmp_im2im_src.wbmp
tests/gd2/gd2_empty_file
tests/gdimagesetpixel/bug00186
tests/gdimagestringftex/gdimagestringftex_returnfontpathname
tests/gdimageline/gdimageline_aa_outofrange
tests/gdimagerectangle/bug00003
tests/gdimagerectangle/bug00106_gdimagerectangle
tests/gd/gd_null
tests/gd/gd_num_colors
tests/tga/tga_null
tests/gdimagepixelate/gdimagepixelate
tests/gdimagecopy/bug00007
tests/gdnewfilectx/gdnewfilectx_null
tests/gdimagefilledrectangle/bug00078
tests/gdimagefilledrectangle/bug00004
tests/gdimagefilledrectangle/bug00106_gdimagefilledrectangle
tests/gdimagecolordeallocate/gdimagecolordeallocate
tests/wbmp/wbmp_null
tests/gdimagecolortransparent/gdimagecolortransparent
tests/gif/bug00005_2
tests/gif/gif_null
tests/gif/bug00181
tests/gif/bug00227
tests/bmp/bmp_null
tests/gdimagestringft/gdimagestringft_bbox
tests/gdtiled/bug00032
tests/gd2/gd2_im2im
tests/gd2/gd2_null
tests/gd2/gd2_read
tests/gdimagearc/bug00079
tests/gdimageline/gdimageline_aa
tests/gdimageline/bug00072
tests/gdimageline/bug00077
tests/gdimageline/bug00111
tests/gdimageopenpolygon/gdimageopenpolygon2
tests/gdimageopenpolygon/gdimageopenpolygon1
tests/gdimageopenpolygon/gdimageopenpolygon0
tests/gdimageopenpolygon/gdimageopenpolygon3
tests/gd/gd_im2im
tests/gdimagecopy/bug00081
tests/gdimagecopyrotated/bug00020
tests/gdimagepolygon/gdimagepolygon0
tests/gdimagepolygon/gdimagepolygon3
tests/gdimagepolygon/gdimagepolygon1
tests/gdimagepolygon/gdimagepolygon2
tests/gdimagecolorresolve/gdimagecolorresolve
tests/gdimagefilledpolygon/gdimagefilledpolygon0
tests/gdimagefilledpolygon/gdimagefilledpolygon3
tests/gdimagefilledpolygon/gdimagefilledpolygon2
tests/gdimagefilledpolygon/gdimagefilledpolygon1
tests/gdimagefilledpolygon/bug00100
tests/gdimagecolorreplace/gdimagecolorreplace
tests/gdimagefill/bug00002_2
tests/gdimagefill/bug00002_1
tests/gdimagefill/bug00002_4
tests/gdimagefill/bug00002_3
tests/gdimagecolorclosest/gdimagecolorclosest
tests/gif/bug00005
tests/gif/gif_im2im
tests/gif/bug00066
tests/gif/bug00006
tests/gif/bug00060
tests/gdimagecolorexact/gdimagecolorexact
tests/gdimagefilledellipse/bug00191
tests/gdimagefilledellipse/bug00010
tests/xpm/bug00185
tests/xpm/color_name
tests/xpm/bug00166
tests/jpeg/jpeg_empty_file
tests/jpeg/jpeg_resolution
tests/jpeg/jpeg_im2im
tests/jpeg/jpeg_null
tests/jpeg/jpeg_read
tests/png/png_null
tests/png/bug00033
tests/png/bug00193
tests/png/bug00011
tests/png/bug00088
tests/png/png_resolution
tests/png/bug00086
tests/png/png_im2im
tests/wbmp/wbmp_im2im
tests/tiff/tiff_null
tests/tiff/tiff_im2im
tests/freetype/bug00132
tests/bmp/bmp_im2im
tests/gdimagescatterex/bug00208_1
tests/gdimagescatterex/bug00208_2
tests/gdimagefilltoborder/bug00037
tests/gdtest/test_config.h

View File

@ -1,3 +1,3 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src config
SUBDIRS = src config tests
EXTRA_DIST = test tests docs examples windows VMS cmake netware CMakeLists.txt

View File

@ -53,6 +53,7 @@ m4_ifndef([AM_PROG_AR],[m4_define([AM_PROG_AR],[:])])
AM_PROG_AR
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
@ -209,6 +210,7 @@ if test "$withval" != no; then
else
ac_cv_lib_fontconfig_FcInit=no
fi
AM_CONDITIONAL([HAVE_LIBFONTCONFIG], test "$ac_cv_lib_fontconfig_FcInit" = yes)
dnl check for libjpeg by default
AC_ARG_WITH(jpeg,dnl
@ -227,6 +229,7 @@ if test "$withval" != no; then
else
ac_cv_lib_jpeg_jpeg_set_defaults=no
fi
AM_CONDITIONAL([HAVE_LIBJPEG], test "$ac_cv_lib_jpeg_jpeg_set_defaults" = yes)
dnl check for libXpm by default
AC_ARG_WITH(xpm,dnl
@ -245,8 +248,7 @@ if test "$withval" != no; then
else
ac_cv_lib_Xpm_XpmReadFileToXpmImage=no
fi
AM_CONDITIONAL([HAVE_LIBXPM], test "$ac_cv_lib_Xpm_XpmReadFileToXpmImage" = yes)
dnl check for libvpx by default
AC_ARG_WITH(vpx,dnl
@ -265,7 +267,7 @@ if test "$withval" != no; then
else
ac_cv_lib_vpx_vpx_codec_destroy=no
fi
AM_CONDITIONAL([HAVE_LIBVPX], test "$ac_cv_lib_vpx_vpx_codec_destroy" = yes)
dnl check for libtiff by default
AC_ARG_WITH(tiff,dnl
@ -284,6 +286,7 @@ if test "$withval" != no; then
else
ac_cv_lib_tiff_TIFFClientOpen=no
fi
AM_CONDITIONAL([HAVE_LIBTIFF], test "$ac_cv_lib_tiff_TIFFClientOpen" = yes)
gl_VISIBILITY()
CFLAGS="$CFLAGS $CFLAG_VISIBILITY"
@ -307,6 +310,8 @@ AC_MSG_RESULT([
AC_CONFIG_FILES([Makefile
src/Makefile
tests/Makefile
tests/gdtest/test_config.h
config/Makefile
config/gdlib-config
config/gdlib.pc])

View File

@ -19,7 +19,11 @@ endif
bin_SCRIPTS = bdftogd
check_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest testtr fontconfigtest gifanimtest gd_color_map_test
check_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gdtestft testac circletexttest testtr fontconfigtest gifanimtest gd_color_map_test
if HAVE_LIBZ
check_PROGRAMS += gd2time
endif
EXTRA_DIST = bdftogd demoin.png entities.html entities.tcl CMakeLists.txt

220
tests/Makefile.am Normal file
View File

@ -0,0 +1,220 @@
noinst_LIBRARIES = libgdtest.a
libgdtest_a_SOURCES = gdtest/gdtest.c ../src/gdhelpers.c
check_PROGRAMS = \
gd2/gd2_empty_file \
gdimagesetpixel/bug00186 \
gdimagestringftex/gdimagestringftex_returnfontpathname \
gdimageline/gdimageline_aa_outofrange \
gdimagerectangle/bug00003 \
gdimagerectangle/bug00106_gdimagerectangle \
gd/gd_null \
gd/gd_num_colors \
tga/tga_null \
gdimagepixelate/gdimagepixelate \
gdimagecopy/bug00007 \
gdnewfilectx/gdnewfilectx_null \
gdimagefilledrectangle/bug00078 \
gdimagefilledrectangle/bug00004 \
gdimagefilledrectangle/bug00106_gdimagefilledrectangle \
gdimagecolordeallocate/gdimagecolordeallocate \
wbmp/wbmp_null \
gdimagecolortransparent/gdimagecolortransparent \
gif/bug00005_2 \
gif/gif_null \
gif/bug00181 \
gif/bug00227 \
bmp/bmp_null
EXTRA_PROGRAMS = \
gdimagestringft/gdimagestringft_bbox \
gdtiled/bug00032 \
gd2/gd2_im2im \
gd2/gd2_null \
gd2/gd2_read \
gdimagearc/bug00079 \
gdimageline/gdimageline_aa \
gdimageline/bug00072 \
gdimageline/bug00077 \
gdimageline/bug00111 \
gdimageopenpolygon/gdimageopenpolygon2 \
gdimageopenpolygon/gdimageopenpolygon1 \
gdimageopenpolygon/gdimageopenpolygon0 \
gdimageopenpolygon/gdimageopenpolygon3 \
gd/gd_im2im \
gdimagecopy/bug00081 \
gdimagecopyrotated/bug00020 \
gdimagepolygon/gdimagepolygon0 \
gdimagepolygon/gdimagepolygon3 \
gdimagepolygon/gdimagepolygon1 \
gdimagepolygon/gdimagepolygon2 \
gdimagecolorresolve/gdimagecolorresolve \
gdimagefilledpolygon/gdimagefilledpolygon0 \
gdimagefilledpolygon/gdimagefilledpolygon3 \
gdimagefilledpolygon/gdimagefilledpolygon2 \
gdimagefilledpolygon/gdimagefilledpolygon1 \
gdimagefilledpolygon/bug00100 \
gdimagecolorreplace/gdimagecolorreplace \
gdimagefill/bug00002_2 \
gdimagefill/bug00002_1 \
gdimagefill/bug00002_4 \
gdimagefill/bug00002_3 \
gdimagecolorclosest/gdimagecolorclosest \
gif/bug00005 \
gif/gif_im2im \
gif/bug00066 \
gif/bug00006 \
gif/bug00060 \
gdimagecolorexact/gdimagecolorexact \
gdimagefilledellipse/bug00191 \
gdimagefilledellipse/bug00010 \
xpm/bug00185 \
xpm/color_name \
xpm/bug00166 \
jpeg/jpeg_empty_file \
jpeg/jpeg_resolution \
jpeg/jpeg_im2im \
jpeg/jpeg_null \
jpeg/jpeg_read \
png/png_null \
png/bug00033 \
png/bug00193 \
png/bug00011 \
png/bug00088 \
png/png_resolution \
png/bug00086 \
png/png_im2im \
wbmp/wbmp_im2im \
tiff/tiff_null \
tiff/tiff_im2im \
freetype/bug00132 \
bmp/bmp_im2im \
gdimagescatterex/bug00208_1 \
gdimagescatterex/bug00208_2 \
gdimagefilltoborder/bug00037
if HAVE_LIBXPM
check_PROGRAMS += \
xpm/bug00185 \
xpm/color_name \
xpm/bug00166
endif
if HAVE_LIBJPEG
check_PROGRAMS += \
jpeg/jpeg_empty_file \
jpeg/jpeg_resolution \
jpeg/jpeg_im2im \
jpeg/jpeg_null \
jpeg/jpeg_read
endif
if HAVE_LIBZ
check_PROGRAMS += \
gd2/gd2_null
endif
if HAVE_LIBPNG
check_PROGRAMS += \
gdimagestringft/gdimagestringft_bbox \
gdtiled/bug00032 \
gd2/gd2_im2im \
gd2/gd2_read \
gdimagearc/bug00079 \
gdimageline/gdimageline_aa \
gdimageline/bug00072 \
gdimageline/bug00077 \
gdimageline/bug00111 \
gdimageopenpolygon/gdimageopenpolygon2 \
gdimageopenpolygon/gdimageopenpolygon1 \
gdimageopenpolygon/gdimageopenpolygon0 \
gdimageopenpolygon/gdimageopenpolygon3 \
gd/gd_im2im \
gdimagecopy/bug00081 \
gdimagecopyrotated/bug00020 \
gdimagepolygon/gdimagepolygon0 \
gdimagepolygon/gdimagepolygon3 \
gdimagepolygon/gdimagepolygon1 \
gdimagepolygon/gdimagepolygon2 \
gdimagecolorresolve/gdimagecolorresolve \
gdimagefilledpolygon/gdimagefilledpolygon0 \
gdimagefilledpolygon/gdimagefilledpolygon3 \
gdimagefilledpolygon/gdimagefilledpolygon2 \
gdimagefilledpolygon/gdimagefilledpolygon1 \
gdimagefilledpolygon/bug00100 \
gdimagecolorreplace/gdimagecolorreplace \
gdimagefill/bug00002_2 \
gdimagefill/bug00002_1 \
gdimagefill/bug00002_4 \
gdimagefill/bug00002_3 \
gdimagecolorclosest/gdimagecolorclosest \
gif/bug00005 \
gif/gif_im2im \
gif/bug00066 \
gif/bug00006 \
gif/bug00060 \
gdimagecolorexact/gdimagecolorexact \
gdimagefilledellipse/bug00191 \
gdimagefilledellipse/bug00010 \
png/png_null \
png/bug00033 \
png/bug00193 \
png/bug00011 \
png/bug00088 \
png/png_resolution \
png/bug00086 \
png/png_im2im \
wbmp/wbmp_im2im \
bmp/bmp_im2im \
gdimagescatterex/bug00208_1 \
gdimagescatterex/bug00208_2 \
gdimagefilltoborder/bug00037
endif
if HAVE_LIBTIFF
check_PROGRAMS += \
tiff/tiff_null \
tiff/tiff_im2im
endif
if HAVE_LIBFREETYPE
check_PROGRAMS +=
freetype/bug00132
endif
LDADD = ../src/libgd.la libgdtest.a
AM_CPPFLAGS = -I../src -I gdtest
TESTS = $(check_PROGRAMS)
CLEANFILES = \
a.png \
bmp_im2im_dst.bmp \
bmp_im2im_src.bmp \
bug00132.c_35_diff.png \
bug00132.c_35_out.png \
bug00181.gif \
bug00181a.gif \
bug00227.gif \
gd2_im2im_dst.gd2 \
gd2_im2im_src.gd2 \
gd_im2im_dst.gd \
gd_im2im_src.gd \
gdimageline_aa.c_38_diff.png \
gdimageline_aa.c_38_out.png \
gdimagestringft_bbox.png \
gif_im2im_dst.gif \
gif_im2im_src.gif \
jpeg_im2im_dst.jpeg \
jpeg_im2im_src.jpeg \
jpeg_read.c_25_diff.png \
jpeg_read.c_25_out.png \
png_im2im_dst.png \
png_im2im_src.png \
tiff_im2im_dst.tiff \
tiff_im2im_src.tiff \
wbmp/wbmp_im2im_dst.wbmp \
wbmp/wbmp_im2im_src.wbmp \
wbmp_im2im_dst.wbmp \
wbmp_im2im_src.wbmp

View File

@ -0,0 +1,3 @@
/* Define the full path to the top src dir, required to get the path
* of each input data */
#define GDTEST_TOP_DIR "@srcdir@"