diff options
Diffstat (limited to 'test/cairo-test-runner.c')
-rw-r--r-- | test/cairo-test-runner.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index 05d04b78e..7e8b10cd7 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -942,6 +942,20 @@ main (int argc, char **argv) if (ctx.test->preamble != NULL) { status = _cairo_test_runner_preamble (&runner, &ctx); + if (getenv ("CAIRO_TEST_UGLY_HACK_TO_IGNORE_PS_FAILURES")) { + if (strcmp (ctx.test_name, "ps-eps") == 0 || strcmp (ctx.test_name, "fallback-resolution") == 0) { + if (status == CAIRO_TEST_FAILURE) { + cairo_test_log (&ctx, "Turning FAIL into XFAIL due to env\n"); + fprintf (stderr, "Turning FAIL into XFAIL due to env\n"); + runner.num_ignored_via_env++; + status = CAIRO_TEST_XFAILURE; + } else { + fprintf (stderr, "Test was expected to fail due to an environment variable, but did not!\n"); + fprintf (stderr, "Please update the corresponding CAIRO_TEST_IGNORE_* variable.\n"); + status = CAIRO_TEST_ERROR; + } + } + } switch (status) { case CAIRO_TEST_SUCCESS: in_preamble = TRUE; |