[cairo-commit] test/Makefile.am test/Makefile.sources test/Makefile.win32
Jeff Muizelaar
jrmuizel at kemper.freedesktop.org
Wed Feb 18 12:17:44 PST 2009
test/Makefile.am | 251 +++-----------------------------------------------
test/Makefile.sources | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++
test/Makefile.win32 | 125 ++++--------------------
3 files changed, 293 insertions(+), 334 deletions(-)
New commits:
commit f7b3c9df5885a1cd7981ee12b91962bdbfff47af
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date: Mon Feb 16 22:28:32 2009 -0500
Add test/Makefile.sources
This lets test/Makefile.am and test/Makefile.win32 share a common list of sources.
It also makes test/Makefile.win32 useful again.
diff --git a/test/Makefile.am b/test/Makefile.am
index f737fdd..2a1d93b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,276 +1,63 @@
include $(top_srcdir)/build/Makefile.am.common
+include $(top_srcdir)/test/Makefile.sources
+
SUBDIRS=pdiff .
CLEANFILES += have-similar.*
-test_sources = \
- a1-image-sample.c \
- a1-mask.c \
- a1-traps-sample.c \
- a8-mask.c \
- alpha-similar.c \
- big-line.c \
- big-trap.c \
- bilevel-image.c \
- caps.c \
- caps-joins.c \
- caps-joins-alpha.c \
- caps-joins-curve.c \
- caps-sub-paths.c \
- clip-all.c \
- clip-empty.c \
- clip-fill-rule.c \
- clip-fill-rule-pixel-aligned.c \
- clip-nesting.c \
- clip-operator.c \
- clip-push-group.c \
- clip-twice.c \
- clip-zero.c \
- clipped-group.c \
- clipped-surface.c \
- close-path.c \
- composite-integer-translate-source.c \
- composite-integer-translate-over.c \
- composite-integer-translate-over-repeat.c \
- copy-path.c \
- create-for-stream.c \
- create-from-png.c \
- create-from-png-stream.c \
- culled-glyphs.c \
- dash-caps-joins.c \
- dash-curve.c \
- dash-no-dash.c \
- dash-offset-negative.c \
- dash-scale.c \
- dash-state.c \
- dash-zero-length.c \
- degenerate-arc.c \
- degenerate-dash.c \
- degenerate-path.c \
- degenerate-pen.c \
- device-offset.c \
- device-offset-fractional.c \
- device-offset-positive.c \
- device-offset-scale.c \
- extend-pad.c \
- extend-pad-border.c \
- extend-pad-similar.c \
- extend-reflect.c \
- extend-reflect-similar.c \
- extend-repeat.c \
- extend-repeat-similar.c \
- fill-alpha.c \
- fill-alpha-pattern.c \
- fill-and-stroke.c \
- fill-and-stroke-alpha.c \
- fill-and-stroke-alpha-add.c \
- fill-degenerate-sort-order.c \
- fill-image.c \
- fill-missed-stop.c \
- fill-rule.c \
- filter-bilinear-extents.c \
- filter-nearest-offset.c \
- filter-nearest-transformed.c \
- finer-grained-fallbacks.c \
- font-face-get-type.c \
- font-matrix-translation.c \
- font-options.c \
- glyph-cache-pressure.c \
- get-and-set.c \
- get-clip.c \
- get-group-target.c \
- get-path-extents.c \
- gradient-alpha.c \
- gradient-constant-alpha.c \
- gradient-zero-stops.c \
- group-paint.c \
- huge-linear.c \
- huge-radial.c \
- image-surface-source.c \
- infinite-join.c \
- in-fill-empty-trapezoid.c \
- in-fill-trapezoid.c \
- invalid-matrix.c \
- joins.c \
- large-clip.c \
- large-font.c \
- large-source.c \
- large-source-roi.c \
- leaky-dash.c \
- leaky-dashed-rectangle.c \
- leaky-dashed-stroke.c \
- leaky-polygon.c \
- line-width.c \
- line-width-scale.c \
- line-width-zero.c \
- linear-gradient.c \
- linear-gradient-reflect.c \
- long-dashed-lines.c \
- long-lines.c \
- mask.c \
- mask-alpha.c \
- mask-ctm.c \
- mask-surface-ctm.c \
- mask-transformed-image.c \
- mask-transformed-similar.c \
- meta-surface-pattern.c \
- mime-data.c \
- miter-precision.c \
- move-to-show-surface.c \
- new-sub-path.c \
- nil-surface.c \
- operator.c \
- operator-alpha.c \
- operator-clear.c \
- operator-source.c \
- over-above-source.c \
- over-around-source.c \
- over-below-source.c \
- over-between-source.c \
- paint.c \
- paint-repeat.c \
- paint-source-alpha.c \
- paint-with-alpha.c \
- path-precision.c \
- pattern-get-type.c \
- pattern-getters.c \
- pixman-rotate.c \
- png.c \
- push-group.c \
- radial-gradient.c \
- random-intersections.c \
- rectangle-rounding-error.c \
- rectilinear-fill.c \
- rectilinear-miter-limit.c \
- rectilinear-dash.c \
- rectilinear-stroke.c \
- reflected-stroke.c \
- rel-path.c \
- rgb24-ignore-alpha.c \
- rotate-image-surface-paint.c \
- scale-down-source-surface-paint.c \
- scale-offset-image.c \
- scale-offset-similar.c \
- scale-source-surface-paint.c \
- scaled-font-zero-matrix.c \
- stroke-ctm-caps.c \
- stroke-image.c \
- select-font-face.c \
- select-font-no-show-text.c \
- self-copy.c \
- self-copy-overlap.c \
- self-intersecting.c \
- set-source.c \
- show-glyphs-many.c \
- show-text-current-point.c \
- skew-extreme.c \
- smask.c \
- smask-fill.c \
- smask-image-mask.c \
- smask-mask.c \
- smask-paint.c \
- smask-stroke.c \
- smask-text.c \
- solid-pattern-cache-stress.c \
- source-clip.c \
- source-clip-scale.c \
- source-surface-scale-paint.c \
- spline-decomposition.c \
- surface-finish-twice.c \
- surface-pattern.c \
- surface-pattern-big-scale-down.c \
- surface-pattern-scale-down.c \
- surface-pattern-scale-up.c \
- text-antialias-gray.c \
- text-antialias-none.c \
- text-antialias-subpixel.c \
- text-cache-crash.c \
- text-glyph-range.c \
- text-pattern.c \
- text-rotate.c \
- text-transform.c \
- text-zero-len.c \
- toy-font-face.c \
- transforms.c \
- translate-show-surface.c \
- trap-clip.c \
- truetype-tables.c \
- twin.c \
- unantialiased-shapes.c \
- unbounded-operator.c \
- user-data.c \
- user-font.c \
- user-font-mask.c \
- user-font-proxy.c \
- user-font-rescale.c \
- zero-alpha.c
-
# Then we have a collection of tests that are only run if certain
# features are compiled into cairo
if HAVE_PTHREAD
-test_sources += pthread-show-text.c
+test_sources += $(pthread_test_sources)
endif
if CAIRO_HAS_FT_FONT
-test_sources += bitmap-font.c
-test_sources += ft-font-create-for-ft-face.c
-test_sources += ft-show-glyphs-positioning.c
-test_sources += ft-show-glyphs-table.c
-test_sources += ft-text-vertical-layout-type1.c
-test_sources += ft-text-vertical-layout-type3.c
-test_sources += ft-text-antialias-none.c
+test_sources += $(ft_font_sources)
endif
# Need to add quartz-surface-source
if CAIRO_HAS_QUARTZ_SURFACE
-test_sources += quartz-surface-source.c
+test_sources += $(quartz_surface_sources)
endif
if CAIRO_HAS_GLITZ_SURFACE
-test_sources += glitz-surface-source.c
+test_sources += $(glitz_surface_sources)
endif
if CAIRO_HAS_PDF_SURFACE
-test_sources += pdf-features.c
-test_sources += pdf-mime-data.c
-test_sources += pdf-surface-source.c
+test_sources += $(pdf_surface_test_sources)
endif
if CAIRO_HAS_PS_SURFACE
-test_sources += ps-features.c
-test_sources += ps-surface-source.c
+test_sources += $(ps_surface_test_sources)
endif
if CAIRO_HAS_SVG_SURFACE
-test_sources += svg-surface.c
-test_sources += svg-clip.c
-test_sources += svg-surface-source.c
+test_sources += $(svg_surface_test_sources)
endif
if CAIRO_HAS_XLIB_SURFACE
-test_sources += xlib-expose-event.c
-test_sources += xlib-surface.c
-test_sources += xlib-surface-source.c
+test_sources += $(xlib_surface_test_sources)
endif
if CAIRO_HAS_XLIB_XRENDER_SURFACE
-test_sources += get-xrender-format.c
+test_sources += $(xlib_xrender_surface_test_sources)
endif
if CAIRO_HAS_MULTI_PAGE_SURFACES
-test_sources += multi-page.c
+test_sources += $(multi_page_surface_test_sources)
endif
# Include fallback-resolution (once!) if we have any of the vector surfaces
if CAIRO_HAS_SVG_SURFACE
-test = fallback-resolution.c
+test = $(fallback_resolution_test_sources)
endif
if CAIRO_HAS_PDF_SURFACE
-test = fallback-resolution.c
+test = $(fallback_resolution_test_sources)
endif
if CAIRO_HAS_PS_SURFACE
-test = fallback-resolution.c
+test = $(fallback_resolution_test_sources)
endif
test_sources += $(test)
@@ -280,12 +67,8 @@ cairo-test-constructors.c: Makefile $(test_sources) make-cairo-test-constructors
@(cd $(srcdir) && ./make-cairo-test-constructors.pl $(test_sources)) > $@
cairo_test_suite_SOURCES = \
- buffer-diff.c \
- buffer-diff.h \
- cairo-test.c \
- cairo-test.h \
- cairo-test-private.h \
- cairo-test-runner.c \
+ $(cairo_test_suite_sources) \
+ $(cairo_test_suite_headers) \
$(test_sources)
if CAIRO_HAS_CONSTRUCTOR_ATTRIBUTE
else
diff --git a/test/Makefile.sources b/test/Makefile.sources
new file mode 100644
index 0000000..69c581b
--- /dev/null
+++ b/test/Makefile.sources
@@ -0,0 +1,251 @@
+test_sources = \
+ a1-image-sample.c \
+ a1-mask.c \
+ a1-traps-sample.c \
+ a8-mask.c \
+ alpha-similar.c \
+ big-line.c \
+ big-trap.c \
+ bilevel-image.c \
+ caps.c \
+ caps-joins.c \
+ caps-joins-alpha.c \
+ caps-joins-curve.c \
+ caps-sub-paths.c \
+ clip-all.c \
+ clip-empty.c \
+ clip-fill-rule.c \
+ clip-fill-rule-pixel-aligned.c \
+ clip-nesting.c \
+ clip-operator.c \
+ clip-push-group.c \
+ clip-twice.c \
+ clip-zero.c \
+ clipped-group.c \
+ clipped-surface.c \
+ close-path.c \
+ composite-integer-translate-source.c \
+ composite-integer-translate-over.c \
+ composite-integer-translate-over-repeat.c \
+ copy-path.c \
+ create-for-stream.c \
+ create-from-png.c \
+ create-from-png-stream.c \
+ culled-glyphs.c \
+ dash-caps-joins.c \
+ dash-curve.c \
+ dash-no-dash.c \
+ dash-offset-negative.c \
+ dash-scale.c \
+ dash-state.c \
+ dash-zero-length.c \
+ degenerate-arc.c \
+ degenerate-dash.c \
+ degenerate-path.c \
+ degenerate-pen.c \
+ device-offset.c \
+ device-offset-fractional.c \
+ device-offset-positive.c \
+ device-offset-scale.c \
+ extend-pad.c \
+ extend-pad-border.c \
+ extend-pad-similar.c \
+ extend-reflect.c \
+ extend-reflect-similar.c \
+ extend-repeat.c \
+ extend-repeat-similar.c \
+ fill-alpha.c \
+ fill-alpha-pattern.c \
+ fill-and-stroke.c \
+ fill-and-stroke-alpha.c \
+ fill-and-stroke-alpha-add.c \
+ fill-degenerate-sort-order.c \
+ fill-image.c \
+ fill-missed-stop.c \
+ fill-rule.c \
+ filter-bilinear-extents.c \
+ filter-nearest-offset.c \
+ filter-nearest-transformed.c \
+ finer-grained-fallbacks.c \
+ font-face-get-type.c \
+ font-matrix-translation.c \
+ font-options.c \
+ glyph-cache-pressure.c \
+ get-and-set.c \
+ get-clip.c \
+ get-group-target.c \
+ get-path-extents.c \
+ gradient-alpha.c \
+ gradient-constant-alpha.c \
+ gradient-zero-stops.c \
+ group-paint.c \
+ huge-linear.c \
+ huge-radial.c \
+ image-surface-source.c \
+ infinite-join.c \
+ in-fill-empty-trapezoid.c \
+ in-fill-trapezoid.c \
+ invalid-matrix.c \
+ joins.c \
+ large-clip.c \
+ large-font.c \
+ large-source.c \
+ large-source-roi.c \
+ leaky-dash.c \
+ leaky-dashed-rectangle.c \
+ leaky-dashed-stroke.c \
+ leaky-polygon.c \
+ line-width.c \
+ line-width-scale.c \
+ line-width-zero.c \
+ linear-gradient.c \
+ linear-gradient-reflect.c \
+ long-dashed-lines.c \
+ long-lines.c \
+ mask.c \
+ mask-alpha.c \
+ mask-ctm.c \
+ mask-surface-ctm.c \
+ mask-transformed-image.c \
+ mask-transformed-similar.c \
+ meta-surface-pattern.c \
+ mime-data.c \
+ miter-precision.c \
+ move-to-show-surface.c \
+ new-sub-path.c \
+ nil-surface.c \
+ operator.c \
+ operator-alpha.c \
+ operator-clear.c \
+ operator-source.c \
+ over-above-source.c \
+ over-around-source.c \
+ over-below-source.c \
+ over-between-source.c \
+ paint.c \
+ paint-repeat.c \
+ paint-source-alpha.c \
+ paint-with-alpha.c \
+ path-precision.c \
+ pattern-get-type.c \
+ pattern-getters.c \
+ pixman-rotate.c \
+ png.c \
+ push-group.c \
+ radial-gradient.c \
+ random-intersections.c \
+ rectangle-rounding-error.c \
+ rectilinear-fill.c \
+ rectilinear-miter-limit.c \
+ rectilinear-dash.c \
+ rectilinear-stroke.c \
+ reflected-stroke.c \
+ rel-path.c \
+ rgb24-ignore-alpha.c \
+ rotate-image-surface-paint.c \
+ scale-down-source-surface-paint.c \
+ scale-offset-image.c \
+ scale-offset-similar.c \
+ scale-source-surface-paint.c \
+ scaled-font-zero-matrix.c \
+ stroke-ctm-caps.c \
+ stroke-image.c \
+ select-font-face.c \
+ select-font-no-show-text.c \
+ self-copy.c \
+ self-copy-overlap.c \
+ self-intersecting.c \
+ set-source.c \
+ show-glyphs-many.c \
+ show-text-current-point.c \
+ skew-extreme.c \
+ smask.c \
+ smask-fill.c \
+ smask-image-mask.c \
+ smask-mask.c \
+ smask-paint.c \
+ smask-stroke.c \
+ smask-text.c \
+ solid-pattern-cache-stress.c \
+ source-clip.c \
+ source-clip-scale.c \
+ source-surface-scale-paint.c \
+ spline-decomposition.c \
+ surface-finish-twice.c \
+ surface-pattern.c \
+ surface-pattern-big-scale-down.c \
+ surface-pattern-scale-down.c \
+ surface-pattern-scale-up.c \
+ text-antialias-gray.c \
+ text-antialias-none.c \
+ text-antialias-subpixel.c \
+ text-cache-crash.c \
+ text-glyph-range.c \
+ text-pattern.c \
+ text-rotate.c \
+ text-transform.c \
+ text-zero-len.c \
+ toy-font-face.c \
+ transforms.c \
+ translate-show-surface.c \
+ trap-clip.c \
+ truetype-tables.c \
+ twin.c \
+ unantialiased-shapes.c \
+ unbounded-operator.c \
+ user-data.c \
+ user-font.c \
+ user-font-mask.c \
+ user-font-proxy.c \
+ user-font-rescale.c \
+ zero-alpha.c
+
+pthread_test_sources = pthread-show-text.c
+
+ft_font_test_sources = \
+ bitmap-font.c \
+ ft-font-create-for-ft-face.c \
+ ft-show-glyphs-positioning.c \
+ ft-show-glyphs-table.c \
+ ft-text-vertical-layout-type1.c \
+ ft-text-vertical-layout-type3.c \
+ ft-text-antialias-none.c
+
+quartz_surface_test_sources = quartz-surface-source.c
+
+glitz_surface_test_sources = glitz-surface-source.c
+
+pdf_surface_test_sources = \
+ pdf-features.c \
+ pdf-mime-data.c \
+ pdf-surface-source.c
+
+ps_surface_test_sources = \
+ ps-features.c \
+ ps-surface-source.c
+
+svg_surface_test_sources = \
+ svg-surface.c \
+ svg-clip.c \
+ svg-surface-source.c
+
+xlib_surface_test_sources = \
+ xlib-expose-event.c \
+ xlib-surface.c \
+ xlib-surface-source.c
+
+xlib_xrender_surface_test_sources = get-xrender-format.c
+
+multi_page_surface_test_sources = multi-page.c
+
+fallback_resolution_test_sources = fallback-resolution.c
+
+cairo_test_suite_headers = \
+ buffer-diff.h \
+ cairo-test.h \
+ cairo-test-private.h
+
+cairo_test_suite_sources = \
+ buffer-diff.c \
+ cairo-test.c \
+ cairo-test-runner.c
diff --git a/test/Makefile.win32 b/test/Makefile.win32
index 003d96a..f4c1291 100644
--- a/test/Makefile.win32
+++ b/test/Makefile.win32
@@ -1,121 +1,46 @@
top_srcdir = ..
include $(top_srcdir)/build/Makefile.win32.common
+include $(top_srcdir)/test/Makefile.sources
CFLAGS += -I../src -I../boilerplate -I./pdiff
LDFLAGS += ./pdiff/pdiff.lib ../src/$(CFG)/cairo-static.lib $(PIXMAN_LIBS) ../boilerplate/$(CFG)/boiler.lib $(EXE_LDFLAGS)
-TESTS = \
-a8-mask \
-caps-joins \
-caps-joins-alpha \
-caps-sub-paths \
-clip-all \
-clip-fill-rule \
-clip-fill-rule-pixel-aligned \
-clip-nesting \
-clip-operator \
-clip-twice \
-composite-integer-translate-source \
-composite-integer-translate-over \
-composite-integer-translate-over-repeat \
-create-for-stream \
-create-from-png \
-create-from-png-stream \
-dash-caps-joins \
-dash-no-dash \
-dash-offset-negative \
-dash-scale \
-dash-zero-length \
-degenerate-path \
-device-offset \
-device-offset-positive \
-extend-pad \
-extend-reflect \
-fill-and-stroke \
-fill-and-stroke-alpha \
-fill-and-stroke-alpha-add \
-fill-rule \
-filter-nearest-offset \
-font-face-get-type \
-font-matrix-translation \
-glyph-cache-pressure \
-get-and-set \
-get-clip \
-get-group-target \
-get-path-extents \
-gradient-alpha \
-leaky-dash \
-leaky-polygon \
-line-width \
-line-width-scale \
-linear-gradient \
-mask \
-mask-ctm \
-mask-surface-ctm \
-move-to-show-surface \
-new-sub-path \
-nil-surface \
-operator-clear \
-operator-source \
-paint \
-paint-source-alpha \
-paint-with-alpha \
-pattern-get-type \
-pattern-getters \
-pixman-rotate \
-rectangle-rounding-error \
-scale-source-surface-paint \
-select-font-face \
-select-font-no-show-text \
-self-copy \
-self-intersecting \
-set-source \
-show-text-current-point \
-source-clip \
-source-surface-scale-paint \
-surface-finish-twice \
-surface-pattern \
-text-antialias-gray \
-text-antialias-none \
-text-antialias-subpixel \
-text-cache-crash \
-text-pattern \
-text-rotate \
-transforms \
-translate-show-surface \
-trap-clip \
-unantialiased-shapes \
-unbounded-operator \
-user-data \
-rel-path \
-push-group \
-zero-alpha \
-$(NULL)
TESTCORE_SOURCES = \
cairo-test.c \
buffer-diff.c \
$(NULL)
-TEST_EXE = $(patsubst %, $(CFG)/%.exe, $(TESTS))
-# TEST_EXE = $(addsuffix .exe,$(TESTS))
+all: cairo-test-suite.exe
-all: $(TEST_EXE)
+cairo-test-constructors.c: $(test_sources)
+ ./make-cairo-test-constructors.pl $(test_sources) > $@
-$(CFG)/%.exe: %.c ./pdiff/pdiff.lib
- @mkdir -p $(CFG)
- @$(CC) $(CFLAGS) -Fe"$@" $< $(TESTCORE_SOURCES) -link $(LDFLAGS)
+SOURCES = $(cairo_test_suite_sources) $(test_sources) cairo-test-constructors.c
+
+OBJECTS = $(patsubst %.c, $(CFG)/%.obj, $(SOURCES))
+
+cairo-test-suite.exe: $(OBJECTS)
+ $(CC) $(OPT) $(MS_MDFLAGS) $(OBJECTS) -Fe"$@" -link $(LDFLAGS) /NODEFAULTLIB:library
./pdiff/pdiff.lib:
(cd pdiff ; $(MAKE) -f Makefile.win32)
-test: $(TEST_EXE)
- @for exe in $(TEST_EXE) ; do \
- echo $$exe ; \
- ( ./$$exe || exit 0 ) ; \
- done
+.PHONY: check test html
+
+check: cairo-test-suite.exe
+ ./cairo-test-suite.exe
+
+# define gen-html so that both 'test' and 'html' targets
+# can generate html while having different dependencies
+define gen-html
+ at echo Creating index.html...
+ at perl make-html.pl > index.html
+endef
+
+test: check
+ $(gen-html)
html:
- @echo Creating index.html...
- @perl make-html.pl > index.html
+ $(gen-html)
More information about the cairo-commit
mailing list