diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-25 13:05:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-25 13:08:17 +0100 |
commit | ce3806510f8a20621f3daf7bd1afb18811fa1e92 (patch) | |
tree | 9ff4ba4ef6744bb146e924d81ed03ed6a1d8c91e | |
parent | ffdfdf2fa99dab340e03884267218b134d68265b (diff) |
test: Add a Makefile.refs generator
Generates the lexicographical Makefile.refs based on the *.ref.png and
*.xfail.png checked into git.
This might be nice to automate as a Makefile target. But for now play
safe and do the updates manually.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/Makefile.refs | 5 | ||||
-rwxr-xr-x | test/generate_refs.sh | 12 |
3 files changed, 17 insertions, 2 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 76b6c32c..a96d6a51 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -122,7 +122,7 @@ cairo_test_trace_DEPENDENCIES = \ endif BUILT_SOURCES += cairo-test-constructors.c -EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh run-cairo-test-suite.sh +EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh run-cairo-test-suite.sh generate_refs.sh CLEANFILES += $(BUILT_SOURCES) EXTRA_DIST += \ diff --git a/test/Makefile.refs b/test/Makefile.refs index 10cab7af..26f55669 100644 --- a/test/Makefile.refs +++ b/test/Makefile.refs @@ -1,3 +1,5 @@ +# Note REFERENCE_IMAGES must be in lexicographical order. +# Use generate_refs on a git checkout with updated images. REFERENCE_IMAGES = \ a1-bug.image16.ref.png \ a1-bug.quartz.xfail.png \ @@ -1351,4 +1353,5 @@ REFERENCE_IMAGES = \ xlib-surface-source.svg12.rgb24.xfail.png \ zero-alpha.ref.png \ zero-mask.ref.png \ - zero-mask.rgb24.ref.png + zero-mask.rgb24.ref.png \ + $(NULL) diff --git a/test/generate_refs.sh b/test/generate_refs.sh new file mode 100755 index 00000000..518836b1 --- /dev/null +++ b/test/generate_refs.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# A very simple script. But sufficient, hopefully, for our current purposes. + +cat <<EOF +# Note REFERENCE_IMAGES must be in lexicographical order. +# Use generate_refs.sh on a git checkout with updated images. +REFERENCE_IMAGES = \\ +EOF + +git ls-files '*.ref.png' '*.xfail.png' | sed 's/\(.*\)/ \1 \\/' +echo ' $(NULL)' |