2008-09-11 15:49:09 -04:00
|
|
|
include $(top_srcdir)/build/Makefile.am.common
|
|
|
|
|
|
2009-02-16 22:28:32 -05:00
|
|
|
include $(top_srcdir)/test/Makefile.sources
|
|
|
|
|
|
2006-12-12 16:49:27 -08:00
|
|
|
SUBDIRS=pdiff .
|
2006-12-06 13:19:30 -08:00
|
|
|
|
2006-04-05 16:55:51 -07:00
|
|
|
# Then we have a collection of tests that are only run if certain
|
|
|
|
|
# features are compiled into cairo
|
2010-06-27 03:03:17 +03:00
|
|
|
if HAVE_REAL_PTHREAD
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(pthread_test_sources)
|
2005-09-13 12:11:32 +00:00
|
|
|
endif
|
|
|
|
|
|
2005-08-17 09:51:09 +00:00
|
|
|
if CAIRO_HAS_FT_FONT
|
2009-06-18 16:09:31 +01:00
|
|
|
if CAIRO_HAS_FC_FONT
|
2009-05-15 18:49:03 +01:00
|
|
|
test_sources += $(ft_font_test_sources)
|
2005-08-17 09:51:09 +00:00
|
|
|
endif
|
2009-06-18 16:09:31 +01:00
|
|
|
endif
|
2005-08-17 09:51:09 +00:00
|
|
|
|
2010-05-06 14:38:55 +01:00
|
|
|
if CAIRO_HAS_GL_SURFACE
|
|
|
|
|
test_sources += $(gl_surface_test_sources)
|
|
|
|
|
endif
|
|
|
|
|
|
2014-09-16 10:18:02 +05:30
|
|
|
if CAIRO_HAS_EGL_FUNCTIONS
|
|
|
|
|
test_sources += $(egl_surface_test_sources)
|
|
|
|
|
endif
|
|
|
|
|
|
2008-11-26 15:49:00 +01:00
|
|
|
# Need to add quartz-surface-source
|
|
|
|
|
if CAIRO_HAS_QUARTZ_SURFACE
|
2009-05-15 18:49:03 +01:00
|
|
|
test_sources += $(quartz_surface_test_sources)
|
2008-11-26 15:49:00 +01:00
|
|
|
endif
|
|
|
|
|
|
2006-05-03 12:39:45 -07:00
|
|
|
if CAIRO_HAS_PDF_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(pdf_surface_test_sources)
|
2006-05-03 12:39:45 -07:00
|
|
|
endif
|
|
|
|
|
|
2006-05-02 12:36:23 -07:00
|
|
|
if CAIRO_HAS_PS_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(ps_surface_test_sources)
|
2008-01-18 17:14:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if CAIRO_HAS_SVG_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(svg_surface_test_sources)
|
2006-05-02 12:36:23 -07:00
|
|
|
endif
|
|
|
|
|
|
2009-05-05 13:59:07 +01:00
|
|
|
if CAIRO_HAS_TEST_SURFACES
|
|
|
|
|
test_sources += $(test_fallback16_surface_test_sources)
|
|
|
|
|
endif
|
|
|
|
|
|
2010-01-22 21:57:58 +00:00
|
|
|
if CAIRO_HAS_XCB_SURFACE
|
|
|
|
|
test_sources += $(xcb_surface_test_sources)
|
|
|
|
|
endif
|
|
|
|
|
|
2005-05-13 17:54:43 +00:00
|
|
|
if CAIRO_HAS_XLIB_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(xlib_surface_test_sources)
|
2005-05-13 17:54:43 +00:00
|
|
|
endif
|
|
|
|
|
|
2008-01-27 12:14:51 -08:00
|
|
|
if CAIRO_HAS_XLIB_XRENDER_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(xlib_xrender_surface_test_sources)
|
2008-01-27 12:14:51 -08:00
|
|
|
endif
|
|
|
|
|
|
2006-01-12 16:35:12 +00:00
|
|
|
if CAIRO_HAS_MULTI_PAGE_SURFACES
|
2009-02-16 22:28:32 -05:00
|
|
|
test_sources += $(multi_page_surface_test_sources)
|
2006-01-12 16:35:12 +00:00
|
|
|
endif
|
|
|
|
|
|
2008-08-13 11:03:52 +01:00
|
|
|
# Include fallback-resolution (once!) if we have any of the vector surfaces
|
2009-09-08 17:51:33 +01:00
|
|
|
if BUILD_ANY2PPM
|
2006-06-13 17:24:36 -04:00
|
|
|
if CAIRO_HAS_SVG_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test = $(fallback_resolution_test_sources)
|
2006-06-13 17:24:36 -04:00
|
|
|
endif
|
2008-08-13 11:03:52 +01:00
|
|
|
if CAIRO_HAS_PDF_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test = $(fallback_resolution_test_sources)
|
2006-06-13 17:24:36 -04:00
|
|
|
endif
|
2008-08-13 11:03:52 +01:00
|
|
|
if CAIRO_HAS_PS_SURFACE
|
2009-02-16 22:28:32 -05:00
|
|
|
test = $(fallback_resolution_test_sources)
|
2008-09-03 16:38:03 +01:00
|
|
|
endif
|
2009-09-08 17:51:33 +01:00
|
|
|
endif
|
2008-09-03 16:38:03 +01:00
|
|
|
test_sources += $(test)
|
|
|
|
|
|
2011-07-19 07:26:59 +02:00
|
|
|
noinst_PROGRAMS = cairo-test-suite$(EXEEXT) # always build
|
2013-07-03 22:33:57 +00:00
|
|
|
noinst_SCRIPTS = check-refs.sh
|
2011-07-16 20:45:03 +01:00
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
TESTS += cairo-test-suite$(EXEEXT)
|
|
|
|
|
|
2009-08-06 09:41:15 +01:00
|
|
|
cairo-test-constructors.c: Makefile $(test_sources) make-cairo-test-constructors.sh
|
2015-03-12 17:02:02 +01:00
|
|
|
(cd $(srcdir) && sh ./make-cairo-test-constructors.sh $(test_sources)) > $@ || (rm $@ ; exit 1)
|
2008-09-03 16:38:03 +01:00
|
|
|
|
|
|
|
|
cairo_test_suite_SOURCES = \
|
2009-02-16 22:28:32 -05:00
|
|
|
$(cairo_test_suite_sources) \
|
|
|
|
|
$(cairo_test_suite_headers) \
|
2009-05-24 16:19:31 +03:00
|
|
|
$(test_sources) \
|
|
|
|
|
cairo-test-constructors.c
|
2010-06-27 03:03:17 +03:00
|
|
|
cairo_test_suite_CFLAGS = $(AM_CFLAGS) $(real_pthread_CFLAGS)
|
2008-09-03 16:38:03 +01:00
|
|
|
cairo_test_suite_LDADD = \
|
2010-06-27 03:03:17 +03:00
|
|
|
$(real_pthread_LIBS) \
|
2008-09-03 16:38:03 +01:00
|
|
|
$(top_builddir)/test/pdiff/libpdiff.la \
|
|
|
|
|
$(top_builddir)/boilerplate/libcairoboilerplate.la \
|
|
|
|
|
$(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(CAIRO_LDADD)
|
|
|
|
|
cairo_test_suite_DEPENDENCIES = \
|
|
|
|
|
$(top_builddir)/test/pdiff/libpdiff.la \
|
|
|
|
|
$(top_builddir)/boilerplate/libcairoboilerplate.la \
|
2008-11-04 19:11:55 +00:00
|
|
|
$(top_builddir)/src/libcairo.la
|
|
|
|
|
if BUILD_ANY2PPM
|
|
|
|
|
cairo_test_suite_DEPENDENCIES += \
|
2011-09-18 08:52:46 +01:00
|
|
|
any2ppm$(EXEEXT)
|
2008-11-04 19:11:55 +00:00
|
|
|
endif
|
2008-09-03 16:38:03 +01:00
|
|
|
|
2009-06-13 18:59:17 +01:00
|
|
|
if HAVE_SHM
|
2009-06-13 19:18:11 +01:00
|
|
|
EXTRA_PROGRAMS += cairo-test-trace
|
2009-06-12 22:19:56 +01:00
|
|
|
cairo_test_trace_SOURCES = \
|
2009-06-19 18:40:43 +01:00
|
|
|
cairo-test-trace.c \
|
|
|
|
|
buffer-diff.c \
|
|
|
|
|
buffer-diff.h
|
2010-06-27 03:03:17 +03:00
|
|
|
cairo_test_trace_CFLAGS = $(AM_CFLAGS) $(real_pthread_CFLAGS)
|
2009-06-12 22:19:56 +01:00
|
|
|
cairo_test_trace_LDADD = \
|
2010-06-27 03:03:17 +03:00
|
|
|
$(real_pthread_LIBS) \
|
2009-06-19 18:40:43 +01:00
|
|
|
$(top_builddir)/test/pdiff/libpdiff.la \
|
2009-06-12 22:19:56 +01:00
|
|
|
$(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \
|
|
|
|
|
$(top_builddir)/boilerplate/libcairoboilerplate.la \
|
|
|
|
|
$(top_builddir)/src/libcairo.la \
|
2011-08-30 16:16:04 +02:00
|
|
|
$(top_builddir)/util/cairo-missing/libcairo-missing.la \
|
2009-06-12 22:19:56 +01:00
|
|
|
$(CAIRO_LDADD) \
|
2009-06-13 18:59:17 +01:00
|
|
|
$(SHM_LIBS)
|
2009-06-12 22:19:56 +01:00
|
|
|
cairo_test_trace_DEPENDENCIES = \
|
2009-06-19 18:40:43 +01:00
|
|
|
$(top_builddir)/test/pdiff/libpdiff.la \
|
2009-06-12 22:19:56 +01:00
|
|
|
$(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \
|
|
|
|
|
$(top_builddir)/boilerplate/libcairoboilerplate.la \
|
2011-08-30 16:16:04 +02:00
|
|
|
$(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(top_builddir)/util/cairo-missing/libcairo-missing.la \
|
|
|
|
|
$(NULL)
|
2009-06-13 18:59:17 +01:00
|
|
|
endif
|
2009-06-12 22:19:56 +01:00
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
BUILT_SOURCES += cairo-test-constructors.c
|
2011-09-14 18:59:32 +01:00
|
|
|
EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh run-cairo-test-suite.sh generate_refs.sh tiger.inc
|
2009-08-06 09:41:15 +01:00
|
|
|
CLEANFILES += $(BUILT_SOURCES)
|
2006-06-13 17:24:36 -04:00
|
|
|
|
2008-09-11 15:49:09 -04:00
|
|
|
EXTRA_DIST += \
|
2007-03-03 00:05:40 -05:00
|
|
|
6x13.pcf \
|
2010-09-26 11:05:35 +02:00
|
|
|
index.html \
|
|
|
|
|
jp2.jp2 \
|
2008-11-04 13:46:10 +00:00
|
|
|
jpeg.jpg \
|
2008-11-05 17:18:51 +00:00
|
|
|
png.png \
|
2008-11-04 22:25:26 +10:30
|
|
|
romedalen.jpg \
|
2007-03-03 00:05:40 -05:00
|
|
|
romedalen.png \
|
2008-11-04 13:00:36 +00:00
|
|
|
scarab.jpg \
|
2008-01-18 17:14:17 +00:00
|
|
|
surface-source.c \
|
2010-09-26 11:05:35 +02:00
|
|
|
testtable.js \
|
2011-09-27 15:29:06 +01:00
|
|
|
reference
|
2005-01-17 09:18:37 +00:00
|
|
|
|
2006-07-11 17:27:08 -04:00
|
|
|
# Any test that doesn't generate a log file goes here
|
|
|
|
|
NOLOG_TESTS = \
|
2008-01-17 22:31:05 +00:00
|
|
|
fallback-resolution \
|
|
|
|
|
font-options \
|
|
|
|
|
multi-page \
|
2006-07-11 17:27:08 -04:00
|
|
|
pdf-features \
|
2008-01-18 14:53:50 +00:00
|
|
|
png \
|
2009-09-24 23:02:38 +09:30
|
|
|
ps-eps \
|
2006-07-11 17:27:08 -04:00
|
|
|
ps-features \
|
2008-01-17 22:31:05 +00:00
|
|
|
svg-clip \
|
|
|
|
|
svg-surface \
|
2008-08-06 21:37:36 -04:00
|
|
|
toy-font-face \
|
2008-01-17 22:31:05 +00:00
|
|
|
user-data
|
2006-07-11 17:27:08 -04:00
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
# A target to summarise the failures
|
|
|
|
|
check-summary:
|
2008-01-13 15:00:58 +00:00
|
|
|
@FAILED_TESTS=""; \
|
2012-03-23 12:26:12 +00:00
|
|
|
for t in output/*.log; do \
|
2008-01-13 15:00:58 +00:00
|
|
|
if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \
|
2012-03-23 12:26:12 +00:00
|
|
|
FAILED_TESTS="$$FAILED_TESTS $$t"; \
|
2008-01-13 15:00:58 +00:00
|
|
|
fi; \
|
|
|
|
|
done; \
|
|
|
|
|
if test -n "$$FAILED_TESTS"; then \
|
|
|
|
|
echo "Failed tests:"; \
|
2008-02-06 11:37:13 +00:00
|
|
|
surfaces=""; \
|
2008-01-13 15:00:58 +00:00
|
|
|
for t in $$FAILED_TESTS; do \
|
2012-03-23 12:26:12 +00:00
|
|
|
name="$${t##output/}"; name="$${name%.log}"; \
|
|
|
|
|
echo -n " $$name: "; \
|
|
|
|
|
grep -e '\<FAIL\>' $$t | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \
|
2008-01-13 15:00:58 +00:00
|
|
|
echo; \
|
2012-03-23 12:26:12 +00:00
|
|
|
for s in `grep -e '\<FAIL\>' $$t | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq`; do \
|
2008-04-05 22:01:24 +01:00
|
|
|
ss=`echo $$s | tr '-' '_'`; \
|
2012-03-23 12:26:12 +00:00
|
|
|
tt=`echo $$name | tr '-' '_'`; \
|
2008-04-05 09:31:22 +01:00
|
|
|
eval $$ss=\""$${!ss} $$tt"\"; \
|
2008-02-06 11:37:13 +00:00
|
|
|
echo $$surfaces | grep $$ss >/dev/null || surfaces="$$surfaces $$ss"; \
|
|
|
|
|
done; \
|
2008-01-13 15:00:58 +00:00
|
|
|
done; \
|
2008-02-06 11:37:13 +00:00
|
|
|
echo -n "Failures per surface - "; \
|
|
|
|
|
first=""; \
|
|
|
|
|
for s in $$surfaces; do \
|
2008-04-05 22:01:24 +01:00
|
|
|
ss=`echo $$s | tr '_' '-'`; \
|
2008-02-06 11:37:13 +00:00
|
|
|
test -n "$$first" && echo -n ", "; \
|
2008-04-05 09:31:22 +01:00
|
|
|
cnt=`echo $${!s} | wc -w`; \
|
|
|
|
|
echo -n "$$ss: $$cnt"; \
|
2008-02-06 11:37:13 +00:00
|
|
|
first="false"; \
|
|
|
|
|
done; \
|
|
|
|
|
echo "."; \
|
2008-04-05 09:31:22 +01:00
|
|
|
for s in $$surfaces; do \
|
2008-04-05 22:01:24 +01:00
|
|
|
ss=`echo $$s | tr '_' '-'`; \
|
2008-04-05 09:31:22 +01:00
|
|
|
cnt=`echo $${!s} | wc -w`; \
|
|
|
|
|
echo -n " $$ss [$$cnt]: "; \
|
|
|
|
|
echo $${!s} | tr '_' '-'; \
|
|
|
|
|
done; \
|
2008-01-13 15:00:58 +00:00
|
|
|
fi
|
|
|
|
|
|
2008-09-08 15:13:07 -04:00
|
|
|
AM_CPPFLAGS = \
|
2006-08-31 01:39:06 -07:00
|
|
|
-I$(srcdir) \
|
2006-12-14 04:17:07 -08:00
|
|
|
-I$(srcdir)/pdiff \
|
2006-08-30 15:34:27 -07:00
|
|
|
-I$(top_srcdir)/boilerplate \
|
2011-08-30 16:16:04 +02:00
|
|
|
-I$(top_srcdir)/util/cairo-missing \
|
2008-11-16 18:21:52 +00:00
|
|
|
-I$(top_srcdir)/util/cairo-script \
|
2005-08-10 13:32:06 +00:00
|
|
|
-I$(top_srcdir)/src \
|
2006-11-27 13:23:13 -05:00
|
|
|
-I$(top_builddir)/src \
|
2005-08-10 13:32:06 +00:00
|
|
|
$(CAIRO_CFLAGS)
|
2008-12-12 18:10:58 +00:00
|
|
|
AM_LDFLAGS = $(CAIRO_LDFLAGS)
|
2004-10-26 14:38:43 +00:00
|
|
|
|
2007-04-08 22:03:46 -04:00
|
|
|
$(top_builddir)/boilerplate/libcairoboilerplate.la: $(top_builddir)/src/libcairo.la
|
2006-10-25 15:28:36 -04:00
|
|
|
cd $(top_builddir)/boilerplate && $(MAKE) $(AM_MAKEFLAGS) libcairoboilerplate.la
|
|
|
|
|
|
|
|
|
|
$(top_builddir)/src/libcairo.la:
|
|
|
|
|
cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libcairo.la
|
|
|
|
|
|
2007-03-08 19:22:57 -05:00
|
|
|
$(top_builddir)/test/pdiff/libpdiff.la:
|
|
|
|
|
cd $(top_builddir)/test/pdiff && $(MAKE) $(AM_MAKEFLAGS) libpdiff.la
|
|
|
|
|
|
2013-07-03 22:35:47 +00:00
|
|
|
$(top_builddir)/test/pdiff/perceptualdiff:
|
|
|
|
|
cd $(top_builddir)/test/pdiff && $(MAKE) $(AM_MAKEFLAGS) perceptualdiff
|
|
|
|
|
|
2008-11-16 16:19:25 +00:00
|
|
|
$(top_builddir)/util/cairo-script/libcairo-script-interpreter.la: $(top_builddir)/src/libcairo.la
|
2008-11-16 18:21:52 +00:00
|
|
|
cd $(top_builddir)/util/cairo-script && $(MAKE) $(AM_MAKEFLAGS) libcairo-script-interpreter.la
|
2008-11-16 16:19:25 +00:00
|
|
|
|
2009-06-13 19:18:11 +01:00
|
|
|
EXTRA_PROGRAMS += imagediff png-flatten
|
2008-09-03 16:38:03 +01:00
|
|
|
|
|
|
|
|
imagediff_SOURCES = \
|
|
|
|
|
imagediff.c \
|
|
|
|
|
buffer-diff.c \
|
|
|
|
|
buffer-diff.h
|
|
|
|
|
imagediff_LDADD = \
|
2008-11-04 12:31:10 +00:00
|
|
|
$(top_builddir)/test/pdiff/libpdiff.la \
|
|
|
|
|
$(top_builddir)/src/libcairo.la
|
2005-08-13 03:26:18 +00:00
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
png_flatten_SOURCES = png-flatten.c
|
2008-12-17 09:32:16 +00:00
|
|
|
png_flatten_LDADD = $(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(CAIRO_LDADD)
|
2005-01-25 14:45:31 +00:00
|
|
|
|
2008-08-18 18:50:00 +01:00
|
|
|
if BUILD_ANY2PPM
|
|
|
|
|
check_PROGRAMS += any2ppm
|
2008-12-12 18:10:58 +00:00
|
|
|
any2ppm_CFLAGS = $(AM_CFLAGS) $(POPPLER_CFLAGS) $(LIBRSVG_CFLAGS) $(LIBSPECTRE_CFLAGS)
|
2008-08-18 18:50:00 +01:00
|
|
|
# add LDADD, so poppler/librsvg uses "our" cairo
|
2008-12-12 18:10:58 +00:00
|
|
|
any2ppm_LDFLAGS = $(AM_LDFLAGS) $(CAIRO_TEST_UNDEFINED_LDFLAGS)
|
2008-12-17 09:32:16 +00:00
|
|
|
any2ppm_LDADD = \
|
|
|
|
|
$(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \
|
|
|
|
|
$(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(CAIRO_LDADD) \
|
|
|
|
|
$(CAIROBOILERPLATE_LIBS) \
|
|
|
|
|
$(POPPLER_LIBS) \
|
|
|
|
|
$(LIBRSVG_LIBS) \
|
|
|
|
|
$(LIBSPECTRE_LIBS)
|
2008-08-18 18:50:00 +01:00
|
|
|
endif
|
|
|
|
|
|
2005-12-07 16:06:11 +00:00
|
|
|
if CAIRO_CAN_TEST_PDF_SURFACE
|
2007-06-11 02:42:04 -04:00
|
|
|
check_PROGRAMS += pdf2png
|
2008-12-12 18:10:58 +00:00
|
|
|
pdf2png_CFLAGS = $(AM_CFLAGS) $(POPPLER_CFLAGS)
|
2007-02-20 01:00:17 -05:00
|
|
|
# add LDADD, so poppler uses "our" cairo
|
2008-12-12 18:10:58 +00:00
|
|
|
pdf2png_LDFLAGS = $(AM_LDFLAGS) $(CAIRO_TEST_UNDEFINED_LDFLAGS)
|
2008-12-17 09:32:16 +00:00
|
|
|
pdf2png_LDADD = $(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(CAIRO_LDADD) \
|
|
|
|
|
$(POPPLER_LIBS)
|
2005-12-07 16:06:11 +00:00
|
|
|
endif
|
|
|
|
|
|
2005-12-19 13:59:34 +00:00
|
|
|
if CAIRO_CAN_TEST_SVG_SURFACE
|
2007-06-11 02:42:04 -04:00
|
|
|
check_PROGRAMS += svg2png
|
2008-12-12 18:10:58 +00:00
|
|
|
svg2png_CFLAGS = $(AM_CFLAGS) $(LIBRSVG_CFLAGS)
|
2007-02-20 01:00:17 -05:00
|
|
|
# add LDADD, so librsvg uses "our" cairo
|
2008-12-12 18:10:58 +00:00
|
|
|
svg2png_LDFLAGS = $(AM_LDFLAGS) $(CAIRO_TEST_UNDEFINED_LDFLAGS)
|
2008-12-17 09:32:16 +00:00
|
|
|
svg2png_LDADD = $(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(CAIRO_LDADD) \
|
|
|
|
|
$(LIBRSVG_LIBS)
|
2005-12-19 13:59:34 +00:00
|
|
|
endif
|
|
|
|
|
|
2008-10-11 18:10:16 +01:00
|
|
|
if CAIRO_HAS_SPECTRE
|
2008-09-21 14:29:30 +02:00
|
|
|
check_PROGRAMS += ps2png
|
2008-12-12 18:10:58 +00:00
|
|
|
ps2png_CFLAGS = $(AM_CFLAGS) $(LIBSPECTRE_CFLAGS)
|
2008-09-21 14:29:30 +02:00
|
|
|
# add LDADD, so ps2png uses "our" cairo
|
2008-12-12 18:10:58 +00:00
|
|
|
ps2png_LDFLAGS = $(AM_LDFLAGS) $(CAIRO_TEST_UNDEFINED_LDFLAGS)
|
2008-12-17 09:32:16 +00:00
|
|
|
ps2png_LDADD = $(top_builddir)/src/libcairo.la \
|
|
|
|
|
$(CAIRO_LDADD) \
|
|
|
|
|
$(LIBSPECTRE_LIBS)
|
2008-09-21 14:29:30 +02:00
|
|
|
endif
|
|
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
EXTRA_PROGRAMS += $(TESTS)
|
2006-07-11 17:27:08 -04:00
|
|
|
|
2006-07-27 14:58:46 -04:00
|
|
|
# Do a funny transition of CAIRO_TEST_TARGET through TARGETS such that
|
|
|
|
|
# one can limit tested targets both through CAIRO_TEST_TARGET env var
|
2007-09-05 12:38:27 -04:00
|
|
|
# and TARGETS make var on the command line. Same for the rest.
|
2006-07-27 14:58:46 -04:00
|
|
|
TARGETS = $(CAIRO_TEST_TARGET)
|
2007-09-05 12:38:27 -04:00
|
|
|
TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE)
|
2014-07-24 14:19:21 +05:30
|
|
|
FORMAT = $(CAIRO_TEST_TARGET_FORMAT)
|
2008-08-11 21:12:45 +01:00
|
|
|
NUM_THREADS = $(CAIRO_TEST_NUM_THREADS)
|
2008-09-03 16:38:03 +01:00
|
|
|
MODE = $(CAIRO_TEST_MODE)
|
2006-07-11 22:19:39 -04:00
|
|
|
|
2008-05-15 18:50:55 -04:00
|
|
|
# Same about ENV vs CAIRO_TEST_ENV. ENV is used with "make run" only
|
|
|
|
|
ENV = $(CAIRO_TEST_ENV)
|
|
|
|
|
|
2014-07-24 14:19:21 +05:30
|
|
|
TESTS_ENVIRONMENT = CAIRO_TEST_MODE="$(MODE)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_FORMAT="$(FORMAT)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" CAIRO_TEST_NUM_THREADS="$(NUM_THREADS)" $(ENV)
|
2006-07-11 22:19:39 -04:00
|
|
|
|
2007-03-02 15:45:02 -05:00
|
|
|
EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)
|
2006-08-13 04:44:39 -04:00
|
|
|
VALGRIND_FLAGS = \
|
2006-08-31 13:18:37 -04:00
|
|
|
--tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
|
2010-01-19 22:41:45 +00:00
|
|
|
--track-origins=yes \
|
|
|
|
|
--leak-check=yes --show-reachable=yes \
|
|
|
|
|
$(EXTRA_VALGRIND_FLAGS)
|
2006-08-13 04:44:39 -04:00
|
|
|
|
2008-09-11 15:49:09 -04:00
|
|
|
CLEANFILES += \
|
2006-07-11 17:27:08 -04:00
|
|
|
valgrind-log \
|
2006-08-10 15:35:36 -04:00
|
|
|
ref.hash \
|
2011-03-21 11:08:46 +01:00
|
|
|
ref.list \
|
2008-03-20 16:13:28 -07:00
|
|
|
png-test.png \
|
2009-06-11 15:28:02 -07:00
|
|
|
png.out.png \
|
2008-10-29 16:15:12 -07:00
|
|
|
create-for-stream.pdf \
|
|
|
|
|
create-for-stream.ps \
|
|
|
|
|
create-for-stream.svg \
|
2009-06-11 15:28:02 -07:00
|
|
|
svg-surface-source.out.svg \
|
|
|
|
|
pdf-surface-source.out.pdf \
|
|
|
|
|
ps-surface-source.out.ps \
|
2008-10-29 16:15:12 -07:00
|
|
|
pdf-features.pdf \
|
2008-11-04 12:45:47 +00:00
|
|
|
pdf-mime-data.out* \
|
2016-10-01 22:48:05 +09:30
|
|
|
pdf-tagged-text.out* \
|
2008-10-29 16:15:12 -07:00
|
|
|
ps-features.ps \
|
|
|
|
|
svg-clip.svg \
|
|
|
|
|
svg-surface.svg \
|
|
|
|
|
multi-page.pdf \
|
|
|
|
|
multi-page.ps \
|
2008-09-11 18:06:57 -04:00
|
|
|
$(NULL)
|
2005-07-15 10:39:59 +00:00
|
|
|
|
2007-04-12 03:01:31 +01:00
|
|
|
# This used to be a simple 'echo ${RM} *.ps *.pdf *.svg *.etc', but
|
|
|
|
|
# most systems cannot handle all of our clean files together.
|
|
|
|
|
# Then it became a fancy find using many GNU extensions, but then the ugly
|
|
|
|
|
# reality of portability was raised and it became....
|
2008-12-03 10:52:59 +00:00
|
|
|
clean-local:
|
2008-09-03 16:38:03 +01:00
|
|
|
rm -rf output
|
2007-04-12 03:01:31 +01:00
|
|
|
-${FIND} . -name '*.log' -print | ${XARGS} ${RM}
|
2008-08-14 16:30:54 +01:00
|
|
|
-${FIND} . -name '*.[is]' -print | ${XARGS} ${RM}
|
2008-08-20 19:44:30 +01:00
|
|
|
clean-caches:
|
2008-12-03 10:52:59 +00:00
|
|
|
-${FIND} output -name '*.fail.*' -print | ${XARGS} ${RM}
|
|
|
|
|
-${FIND} output -name '*.pass.*' -print | ${XARGS} ${RM}
|
2006-12-06 19:02:09 -05:00
|
|
|
|
2006-07-13 11:27:05 -04:00
|
|
|
# The following definitions both should work.
|
2008-09-03 16:38:03 +01:00
|
|
|
#FAILED_TESTS = `grep -l '\<FAIL\>' $(test_sources:.c=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo`
|
|
|
|
|
FAILED_TESTS = `grep -l '\<FAIL\>' $(test_sources:.c=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'`
|
2006-07-13 11:27:05 -04:00
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
recheck = check CAIRO_TESTS="$(FAILED_TESTS)"
|
2006-07-13 11:27:05 -04:00
|
|
|
|
2006-07-11 17:27:08 -04:00
|
|
|
# Re-checks all failed tests, i.e. tests with a log file that has a failure
|
|
|
|
|
recheck:
|
|
|
|
|
@echo Re-checking failed tests
|
2006-08-11 00:24:01 -04:00
|
|
|
@$(MAKE) $(AM_MAKEFLAGS) $(recheck)
|
2006-07-11 17:27:08 -04:00
|
|
|
|
2010-09-26 11:05:35 +02:00
|
|
|
# Checks tests.
|
2006-07-11 17:27:08 -04:00
|
|
|
# Target doesn't fail if tests fail.
|
|
|
|
|
test:
|
2010-09-26 11:05:35 +02:00
|
|
|
@$(MAKE) $(AM_MAKEFLAGS) check
|
2006-05-28 16:50:54 +02:00
|
|
|
|
2010-09-26 11:05:35 +02:00
|
|
|
# Re-checks tests.
|
2006-07-11 17:27:08 -04:00
|
|
|
# Target doesn't fail if tests fail.
|
|
|
|
|
retest:
|
2008-09-03 16:38:03 +01:00
|
|
|
@CAIRO_TESTS="$(FAILED_TESTS)"; \
|
2010-09-26 11:05:35 +02:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) check
|
2006-07-13 11:27:05 -04:00
|
|
|
|
2008-05-15 18:50:55 -04:00
|
|
|
# Run tests under a tool specified by TOOL. For example, make run TOOL=gdb
|
|
|
|
|
run:
|
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute env $(TOOL)'
|
|
|
|
|
|
|
|
|
|
# Check tests under valgrind. Saves log to valgrind-log
|
|
|
|
|
check-valgrind:
|
Remove clip handling from generic surface layer.
Handling clip as part of the surface state, as opposed to being part of
the operation state, is cumbersome and a hindrance to providing true proxy
surface support. For example, the clip must be copied from the surface
onto the fallback image, but this was forgotten causing undue hassle in
each backend. Another example is the contortion the meta surface
endures to ensure the clip is correctly recorded. By contrast passing the
clip along with the operation is quite simple and enables us to write
generic handlers for providing surface wrappers. (And in the future, we
should be able to write more esoteric wrappers, e.g. automatic 2x FSAA,
trivially.)
In brief, instead of the surface automatically applying the clip before
calling the backend, the backend can call into a generic helper to apply
clipping. For raster surfaces, clip regions are handled automatically as
part of the composite interface. For vector surfaces, a clip helper is
introduced to replay and callback into an intersect_clip_path() function
as necessary.
Whilst this is not primarily a performance related change (the change
should just move the computation of the clip from the moment it is applied
by the user to the moment it is required by the backend), it is important
to track any potential regression:
ppc:
Speedups
========
image-rgba evolution-20090607-0 1026085.22 0.18% -> 672972.07 0.77%: 1.52x speedup
▌
image-rgba evolution-20090618-0 680579.98 0.12% -> 573237.66 0.16%: 1.19x speedup
▎
image-rgba swfdec-fill-rate-4xaa-0 460296.92 0.36% -> 407464.63 0.42%: 1.13x speedup
▏
image-rgba swfdec-fill-rate-2xaa-0 128431.95 0.47% -> 115051.86 0.42%: 1.12x speedup
▏
Slowdowns
=========
image-rgba firefox-periodic-table-0 56837.61 0.78% -> 66055.17 3.20%: 1.09x slowdown
▏
2009-07-23 15:32:13 +01:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) CAIRO_TEST_MODE="$(MODE),foreground CAIRO_TEST_TIMEOUT=0" $(top_builddir)/libtool --mode=execute valgrind $(VALGRIND_FLAGS)' 2>&1 | tee valgrind-log
|
2008-05-15 18:50:55 -04:00
|
|
|
|
2010-04-24 00:50:33 +01:00
|
|
|
#%.log: %.c cairo-test-suite
|
|
|
|
|
#-./cairo-test-suite $(<:.c=)
|
2006-07-11 17:27:08 -04:00
|
|
|
|
|
|
|
|
NOLOG_TESTS_LOG = $(NOLOG_TESTS:=.log)
|
|
|
|
|
|
|
|
|
|
$(NOLOG_TESTS_LOG):
|
2008-08-10 23:39:28 -04:00
|
|
|
@echo dummy > $@
|
2006-07-11 17:27:08 -04:00
|
|
|
|
2006-08-10 15:35:36 -04:00
|
|
|
# Identify identical reference images
|
2013-07-03 22:35:47 +00:00
|
|
|
check-ref-dups: check-refs.sh $(top_builddir)/test/pdiff/perceptualdiff
|
2013-07-04 10:04:30 +01:00
|
|
|
sh $(srcdir)/check-refs.sh $(top_builddir)/test/pdiff/perceptualdiff
|
2013-07-03 22:35:47 +00:00
|
|
|
|
|
|
|
|
# Remove identical reference images (DANGEROUS)
|
|
|
|
|
clean-ref-dups: check-refs.sh $(top_builddir)/test/pdiff/perceptualdiff
|
2013-07-04 10:04:30 +01:00
|
|
|
sh $(srcdir)/check-refs.sh | cut -d' ' -f2 | while read f; do git rm "reference/$$f"; done
|
2006-08-10 15:35:36 -04:00
|
|
|
|
2011-01-14 12:51:54 +01:00
|
|
|
results.tar:
|
2011-09-15 14:07:00 +01:00
|
|
|
@tar cf $@ index.html testtable.js *.log output/*.log; \
|
2011-01-14 12:51:54 +01:00
|
|
|
for i in output/*.fail.png ; do \
|
|
|
|
|
testname=$${i#output/} ; \
|
|
|
|
|
testname=$${testname%%.*} ; \
|
2012-03-23 12:26:12 +00:00
|
|
|
echo tar uf $@ reference/$${testname}*.ref.png $${i%fail.png}out.png $${i%fail.png}diff.png ; \
|
|
|
|
|
tar uf $@ reference/$${testname}*.ref.png $${i%fail.png}out.png $${i%fail.png}diff.png ; \
|
2011-01-14 12:51:54 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
results.tar.gz: results.tar
|
|
|
|
|
gzip -c $< > $@
|
|
|
|
|
|
2012-03-12 09:24:36 +00:00
|
|
|
release-verify-sane-tests:
|
|
|
|
|
|
|
|
|
|
.PHONY: check-valgrind test recheck retest check-ref-dups release-verify-sane-tests
|
2008-02-06 17:00:29 -08:00
|
|
|
|
|
|
|
|
EXTRA_DIST += Makefile.win32
|