[cairo-commit] test/generate_refs.sh test/Makefile.am test/Makefile.refs

Chris Wilson ickle at kemper.freedesktop.org
Sat Jun 25 05:09:24 PDT 2011


 test/Makefile.am      |    2 +-
 test/Makefile.refs    |    5 ++++-
 test/generate_refs.sh |   12 ++++++++++++
 3 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit ce3806510f8a20621f3daf7bd1afb18811fa1e92
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Jun 25 13:05:19 2011 +0100

    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 at chris-wilson.co.uk>

diff --git a/test/Makefile.am b/test/Makefile.am
index 76b6c32..a96d6a5 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 10cab7a..26f5566 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 0000000..518836b
--- /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)'


More information about the cairo-commit mailing list