diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index 0b0ac9c17..207ad6073 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -98,6 +98,7 @@ typedef struct _cairo_test_runner { cairo_bool_t list_only; cairo_bool_t full_test; cairo_bool_t keyword_match; + cairo_bool_t slow; cairo_bool_t force_pass; } cairo_test_runner_t; @@ -321,7 +322,7 @@ static void usage (const char *argv0) { fprintf (stderr, - "Usage: %s [-afkxl] [test-names|keywords ...]\n" + "Usage: %s [-afkxsl] [test-names|keywords ...]\n" " %s -l\n" "\n" "Run the cairo conformance test suite over the given tests (all by default)\n" @@ -331,6 +332,7 @@ usage (const char *argv0) " skips similar surface and device offset testing.\n" " -f foreground; do not fork\n" " -k match tests by keyword\n" + " -s include slow, long running tests\n" " -x exit on first failure\n" " -l list only; just list selected test case names without executing\n" "\n" @@ -347,7 +349,7 @@ _parse_cmdline (cairo_test_runner_t *runner, int *argc, char **argv[]) int c; while (1) { - c = _cairo_getopt (*argc, *argv, ":aflxt"); + c = _cairo_getopt (*argc, *argv, ":aflstx"); if (c == -1) break; @@ -355,6 +357,9 @@ _parse_cmdline (cairo_test_runner_t *runner, int *argc, char **argv[]) case 'a': runner->full_test = TRUE; break; + case 's': + runner->slow = TRUE; + break; case 'l': runner->list_only = TRUE; break; @@ -790,6 +795,14 @@ main (int argc, char **argv) const char *requirements = test->requirements; const char *str; + str = strstr (requirements, "slow"); + if (str != NULL && ! runner.slow) { + if (runner.list_only) + goto TEST_NEXT; + else + goto TEST_SKIPPED; + } + str = strstr (requirements, "cairo"); if (str != NULL && ! _has_required_cairo_version (str)) { if (runner.list_only) diff --git a/test/coverage.c b/test/coverage.c index 198ebae8c..d77b1e334 100644 --- a/test/coverage.c +++ b/test/coverage.c @@ -335,38 +335,38 @@ row_triangles (cairo_t *cr, int width, int height) CAIRO_TEST (coverage_rectangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH, HEIGHT, NULL, rectangles) CAIRO_TEST (coverage_intersecting_quads, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH, HEIGHT, NULL, intersecting_quads) CAIRO_TEST (coverage_intersecting_triangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH, HEIGHT, NULL, intersecting_triangles) CAIRO_TEST (coverage_row_triangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH, HEIGHT, NULL, row_triangles) CAIRO_TEST (coverage_column_triangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH, HEIGHT, NULL, column_triangles) CAIRO_TEST (coverage_triangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH, HEIGHT, NULL, triangles) diff --git a/test/half-coverage.c b/test/half-coverage.c index 50f3b8506..38cafda75 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 */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH * SIZE, HEIGHT, NULL, rectangles) CAIRO_TEST (half_coverage_triangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ WIDTH * SIZE, HEIGHT, NULL, triangles) diff --git a/test/mask-glyphs.c b/test/mask-glyphs.c index 1a76c4e59..0a912e178 100644 --- a/test/mask-glyphs.c +++ b/test/mask-glyphs.c @@ -184,6 +184,6 @@ draw (cairo_t *cr, int width, int height) CAIRO_TEST (mask_glyphs, "Creates a mask using a distorted array of overlapping glyphs", "mask, glyphs", /* keywords */ - NULL, /* requirements */ + "slow", /* requirements */ WIDTH, HEIGHT, NULL, draw) diff --git a/test/partial-coverage.c b/test/partial-coverage.c index ae0ee1ede..0b5cbdcbd 100644 --- a/test/partial-coverage.c +++ b/test/partial-coverage.c @@ -612,51 +612,51 @@ intersecting_triangles (cairo_t *cr, int width, int height) CAIRO_TEST (partial_coverage_rectangles, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, rectangles) CAIRO_TEST (partial_coverage_intersecting_quads, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, intersecting_quads) CAIRO_TEST (partial_coverage_intersecting_triangles, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, intersecting_triangles) CAIRO_TEST (partial_coverage_triangles, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, triangles) CAIRO_TEST (partial_coverage_overlap_three_quarter_triangles, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* 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 */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, overlap_half_triangles_eo) CAIRO_TEST (partial_coverage_overlap_half_triangles, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, overlap_half_triangles) CAIRO_TEST (partial_coverage_half_triangles, "Check the fidelity of the rasterisation.", "coverage raster", /* keywords */ - "target=raster", /* requirements */ + "target=raster slow", /* requirements */ SIZE, SIZE, NULL, half_triangles)