summaryrefslogtreecommitdiff
path: root/test/cairo-test-runner.c
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2021-04-18 10:08:37 +0200
committerUli Schlachter <psychon@znc.in>2021-04-18 12:25:13 +0200
commit2f8b5bc7b202a00c19bfce732564c54df47e3010 (patch)
treeb445f91565627c0aa95c3dae9e71b664667ab3d7 /test/cairo-test-runner.c
parent0c9dacbc432abc98ffc5f0d7097821e330663e64 (diff)
downloadcairo-2f8b5bc7b202a00c19bfce732564c54df47e3010.tar.gz
Add hack to ignore a svg test crashes
This adds a special hack to the test suite to ignore the crashes for self-copy and self-copy-overlap for the svg backend in CI. Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'test/cairo-test-runner.c')
-rw-r--r--test/cairo-test-runner.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index c3f12a300..50e944f9c 100644
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -1024,6 +1024,22 @@ main (int argc, char **argv)
status = CAIRO_TEST_ERROR;
}
}
+ if (getenv ("CAIRO_TEST_UGLY_HACK_TO_IGNORE_SVG_ARGB32_SELF_COPIES")) {
+ if ((strcmp (target->name, "svg11") == 0 || strcmp (target->name, "svg12") == 0) &&
+ target->content == CAIRO_CONTENT_COLOR_ALPHA &&
+ (strcmp (ctx.test_name, "self-copy") == 0 || strcmp (ctx.test_name, "self-copy-overlap") == 0)) {
+ if (status == CAIRO_TEST_CRASHED) {
+ cairo_test_log (&ctx, "Turning CRASH into XFAIL due to env\n");
+ fprintf (stderr, "Turning CRASH into XFAIL due to env\n");
+ runner.num_ignored_via_env++;
+ status = CAIRO_TEST_XFAILURE;
+ } else {
+ fprintf (stderr, "Test was expected to crash due to an environment variable, but did not!\n");
+ fprintf (stderr, "Please remove the hack to ignore self-copy* crashes for the svg backend.\n");
+ status = CAIRO_TEST_ERROR;
+ }
+ }
+ }
if (getenv ("CAIRO_TEST_UGLY_HACK_TO_IGNORE_SCRIPT_XCB_HUGE_IMAGE_SHM")) {
if (strcmp (target->name, "script") == 0 && strcmp (ctx.test_name, "xcb-huge-image-shm") == 0) {
if (status == CAIRO_TEST_FAILURE) {