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
|
|
|
|
|
|
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
|
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
|
|
|
|
|
(cd $(srcdir) && sh ./make-cairo-test-constructors.sh $(test_sources)) > $@
|
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
|
|
|
|
2005-04-14 10:02:58 +00:00
|
|
|
# Any test for which the code committed to CVS is expected to fail
|
|
|
|
|
# should be listed here.
|
|
|
|
|
#
|
|
|
|
|
# This way, we can avoid being bothered by reports of bugs we are
|
|
|
|
|
# aware of, but users can still report when tests start behaving in
|
|
|
|
|
# unexpected ways on their system.
|
|
|
|
|
#
|
|
|
|
|
# Of course, before any "release" of cairo we should eliminate
|
|
|
|
|
# everything from this list by fixing the bugs. (We don't necessarily
|
|
|
|
|
# have to be that strict for "snapshots" though.)
|
2008-09-29 08:14:24 +01:00
|
|
|
#
|
|
|
|
|
# Analysis of XFAIL errors:
|
|
|
|
|
# alpha-similar - discrepancy between backends in applying color
|
|
|
|
|
# components of a pure alpha surface
|
|
|
|
|
# big-line - range overflow of fixed-point
|
|
|
|
|
# big-trap - range overflow of fixed-point
|
2008-10-20 17:12:21 +01:00
|
|
|
# degenerate-dash - needs path editing in PS to convert degenerate
|
|
|
|
|
# end-caps into the shapes as expected by cairo
|
|
|
|
|
# (Or maybe PS is the correct behaviour?)
|
2008-09-29 08:14:24 +01:00
|
|
|
# degenerate-path - undefined behaviour in PS, needs path editing to
|
|
|
|
|
# convert degenerate segments into circles/rectangles
|
|
|
|
|
# as expected by cairo
|
|
|
|
|
# device-offset-scale - complication of pre-multiplying device_offset
|
2012-03-03 23:00:54 +01:00
|
|
|
# into the pattern_matrix and then requiring further
|
2008-09-29 08:14:24 +01:00
|
|
|
# manipulation for SVG
|
|
|
|
|
# extend-pad - lacks implementation in pixman and consequently used
|
|
|
|
|
# as an excuse for lack of support in other backends
|
2009-10-22 02:13:36 +03:00
|
|
|
# fallback-resolution - The essential problem here is that the recording-surface
|
2008-10-04 20:22:18 +01:00
|
|
|
# has recorded a sequence of operations with one device
|
|
|
|
|
# transformation, and we attempt to replay it with
|
|
|
|
|
# another (basically a scale-factor for the falback
|
|
|
|
|
# resolution). Carl begun to look at this with his
|
|
|
|
|
# chain-of-bugs, but the can of worms is much bigger.
|
2009-10-22 02:13:36 +03:00
|
|
|
# It appears to be a design flaw in the recording-surface
|
2008-10-04 20:22:18 +01:00
|
|
|
# that may spread further...
|
|
|
|
|
# My solution would be to lock Behad and Adrian in a
|
|
|
|
|
# room, with Carl as a moderator and not let them out
|
|
|
|
|
# until they have come up with an interface and
|
|
|
|
|
# semantics that actually work. :-)
|
2009-10-15 14:58:39 -07:00
|
|
|
# in-fill-empty-trapezoid The cairo_in_fill () function can sometimes
|
|
|
|
|
# produce false positives when the tessellator
|
|
|
|
|
# produces empty trapezoids and the query
|
|
|
|
|
# point lands exactly on a trapezoid edge.
|
2008-09-29 08:14:24 +01:00
|
|
|
# long-lines - range overflow of fixed-point
|
2009-05-02 19:09:27 +03:00
|
|
|
# scale-offset-image - loss of precision converting a cairo matrix to
|
|
|
|
|
# scale-offset-similar pixman's fixed point format.
|
2008-09-29 08:14:24 +01:00
|
|
|
# self-copy-overlap - vector surfaces take snapshot of patterns in contrast
|
|
|
|
|
# to the raster backends which don't. One solution
|
|
|
|
|
# would be to clone overlapping areas of dst/source, so
|
|
|
|
|
# patterns were effectively snapshotted across all
|
|
|
|
|
# backends.
|
|
|
|
|
# self-intersecting - incremental trapezoidation of strokes can generate
|
|
|
|
|
# overlapping traps. Needs self-intersection analysis
|
|
|
|
|
# on cairo_traps_t after strokes.
|
|
|
|
|
# Test case should also be expanded to hit special-case
|
|
|
|
|
# tessellators as well.
|
2008-04-05 13:32:51 +10:30
|
|
|
# surface-pattern-big...- Strange, unexplained results for SVG/PS.
|
2008-01-10 15:14:15 +00:00
|
|
|
XFAIL_TESTS = \
|
2008-09-24 16:51:44 -07:00
|
|
|
alpha-similar$(EXEEXT) \
|
2008-02-28 15:41:36 -08:00
|
|
|
big-line$(EXEEXT) \
|
2008-01-10 15:14:15 +00:00
|
|
|
big-trap$(EXEEXT) \
|
2008-10-20 17:12:21 +01:00
|
|
|
degenerate-dash$(EXEEXT) \
|
2008-09-25 00:14:13 -07:00
|
|
|
degenerate-path$(EXEEXT) \
|
2008-09-25 02:49:44 -07:00
|
|
|
device-offset-scale$(EXEEXT) \
|
2008-01-10 15:14:15 +00:00
|
|
|
extend-pad$(EXEEXT) \
|
2008-10-04 20:22:18 +01:00
|
|
|
fallback-resolution$(EXEEXT) \
|
2009-10-15 14:58:39 -07:00
|
|
|
in-fill-empty-trapezoid$(EXEEXT) \
|
2008-01-10 15:14:15 +00:00
|
|
|
long-lines$(EXEEXT) \
|
2008-09-24 16:51:44 -07:00
|
|
|
self-copy-overlap$(EXEEXT) \
|
2008-01-10 15:14:15 +00:00
|
|
|
self-intersecting$(EXEEXT) \
|
|
|
|
|
surface-pattern-big-scale-down$(EXEEXT) \
|
2008-10-30 16:54:23 +00:00
|
|
|
$(NULL)
|
2004-10-26 14:38:43 +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
|
|
|
|
|
|
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)
|
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)
|
|
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
TESTS_ENVIRONMENT = CAIRO_TEST_MODE="$(MODE)" CAIRO_TEST_TARGET="$(TARGETS)" 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* \
|
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
|
|
|
|
|
check-ref-dups:
|
2008-01-23 15:06:52 -05:00
|
|
|
@LANG=C; \
|
2011-06-25 09:39:41 +02:00
|
|
|
( cd "$(srcdir)" && sha1sum *.ref.png | sort ) > ref.hash; \
|
2008-10-31 13:50:55 +00:00
|
|
|
join ref.hash ref.hash | grep -v -E '( .*.ref.png).*\1' | cut -d' ' -f 1-2 | sort -u
|
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
|