[cairo-commit] 2 commits - test/coverage.c test/half-coverage.c test/Makefile.am test/partial-coverage.c test/run-cairo-test-suite.sh

Chris Wilson ickle at kemper.freedesktop.org
Fri Jun 11 04:41:45 PDT 2010


 test/Makefile.am             |    2 +-
 test/coverage.c              |    4 ++--
 test/half-coverage.c         |    4 ++--
 test/partial-coverage.c      |   18 +++++++++---------
 test/run-cairo-test-suite.sh |   18 ++++++++++++++++++
 5 files changed, 32 insertions(+), 14 deletions(-)

New commits:
commit c761e0c5bb55e8869521ad5b4a2447ea9abcb4d1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jun 11 12:40:36 2010 +0100

    test: Restrict the coverage tests to raster targets.
    
    Typo inside the requirements failed to prevent the tests running on the
    vector backends.

diff --git a/test/coverage.c b/test/coverage.c
index ebb13da..70ef97b 100644
--- a/test/coverage.c
+++ b/test/coverage.c
@@ -123,13 +123,13 @@ triangles (cairo_t *cr, int width, int height)
 CAIRO_TEST (coverage_rectangles,
 	    "Check the fidelity of the rasterisation.",
 	    NULL, /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    WIDTH, HEIGHT,
 	    NULL, rectangles)
 
 CAIRO_TEST (coverage_triangles,
 	    "Check the fidelity of the rasterisation.",
 	    NULL, /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    WIDTH, HEIGHT,
 	    NULL, triangles)
diff --git a/test/half-coverage.c b/test/half-coverage.c
index 8dc9784..50f3b85 100644
--- a/test/half-coverage.c
+++ b/test/half-coverage.c
@@ -143,13 +143,13 @@ triangles (cairo_t *cr, int width, int height)
 CAIRO_TEST (half_coverage_rectangles,
 	    "Check the fidelity of the rasterisation.",
 	    NULL, /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    WIDTH * SIZE, HEIGHT,
 	    NULL, rectangles)
 
 CAIRO_TEST (half_coverage_triangles,
 	    "Check the fidelity of the rasterisation.",
 	    NULL, /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    WIDTH * SIZE, HEIGHT,
 	    NULL, triangles)
diff --git a/test/partial-coverage.c b/test/partial-coverage.c
index 100f358..128ca6b 100644
--- a/test/partial-coverage.c
+++ b/test/partial-coverage.c
@@ -494,56 +494,56 @@ triangles (cairo_t *cr, int width, int height)
 CAIRO_TEST (partial_coverage_rectangles,
 	    "Check the fidelity of the rasterisation.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, rectangles)
 
 CAIRO_TEST (partial_coverage_triangles,
 	    "Check the fidelity of the rasterisation.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, triangles)
 CAIRO_TEST (partial_coverage_overlap_three_quarter_triangles,
 	    "Check the fidelity of the rasterisation.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, overlap_three_quarter_triangles)
 CAIRO_TEST (partial_coverage_overlap_half_triangles_eo,
 	    "Check the fidelity of the rasterisation.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, overlap_half_triangles_eo)
 CAIRO_TEST (partial_coverage_overlap_half_triangles,
 	    "Check the fidelity of the rasterisation.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, overlap_half_triangles)
 CAIRO_TEST (partial_coverage_half_triangles,
 	    "Check the fidelity of the rasterisation.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, half_triangles)
 
 CAIRO_TEST (partial_coverage_reference,
 	    "Check the fidelity of this test.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, reference)
 CAIRO_TEST (partial_coverage_three_quarter_reference,
 	    "Check the fidelity of this test.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, three_quarter_reference)
 CAIRO_TEST (partial_coverage_half_reference,
 	    "Check the fidelity of this test.",
 	    "coverage raster", /* keywords */
-	    "raster", /* requirements */
+	    "target=raster", /* requirements */
 	    SIZE, SIZE,
 	    NULL, half_reference)
commit b49c944fe4abb9f3c70fac02a71061bf8d07259a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jun 11 12:38:17 2010 +0100

    test: Add a convenience script to disable the screensaver when testing
    
    If the screensaver activates, it can cause failures when attempting to
    render into an xlib window, so inhibit if we know how.

diff --git a/test/Makefile.am b/test/Makefile.am
index 96cf4e9..4d39301 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -126,7 +126,7 @@ cairo_test_trace_DEPENDENCIES = \
 endif
 
 BUILT_SOURCES += cairo-test-constructors.c
-EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh
+EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING make-cairo-test-constructors.sh run-cairo-test-suite.sh
 CLEANFILES += $(BUILT_SOURCES)
 
 # All tests which have a reference image go here.
diff --git a/test/run-cairo-test-suite.sh b/test/run-cairo-test-suite.sh
new file mode 100755
index 0000000..567d2b1
--- /dev/null
+++ b/test/run-cairo-test-suite.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -m
+
+if `which gnome-screensaver-command`; then
+	gnome-screensaver-command -i -n "cairo-test-suite" -r "Cairo needs to read back from the screen in order to test rendering to xlib" &
+	pid=$!
+
+	restore_screensaver() { kill $pid; }
+else
+	restore_screensaver() { :; }
+fi
+
+trap cleanup SIGINT SIGTERM
+
+./cairo-test-suite "$*"
+
+restore_screensaver


More information about the cairo-commit mailing list