[cairo-commit] 2 commits - .gitlab-ci.yml test/cairo-test-runner.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Apr 17 10:01:19 UTC 2021
.gitlab-ci.yml | 15 ++++++
test/cairo-test-runner.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 114 insertions(+), 2 deletions(-)
New commits:
commit 7de7d57592370fbf625741526c689f747db15174
Merge: dfd543d01 a31c7395a
Author: Heiko Lewin <hlewin at gmx.de>
Date: Sat Apr 17 10:01:17 2021 +0000
Merge branch 'ci-make-test-succeeds' into 'master'
CI: Actually run cairo-test-suite
See merge request cairo/cairo!140
commit a31c7395a1ae0dd0cb01eac8fb72a07df955375a
Author: Uli Schlachter <psychon at znc.in>
Date: Sat Apr 17 10:01:17 2021 +0000
test-suite: Add a new mechanism for XFAILs
This commit adds a new mechanism to mark tests as expected to fail via
an environment variable. For example, if you expect the tests "foo" and
"bar" to fail when run under image.argb32, you would set
CAIRO_TEST_IGNORE_image_argb32=foo,bar
The test suite then expects these tests to fail and treats this as
xfail. If they do not fail, this is a failure on its own.
This new feature is explicitly not documented much, because it is only
used as a stopgap measure to make our CI more useful: Right now the test
suite runs on CI, but the result is ignored. This new feature allows to
mark the known failures as xfail without too much work. When the
situation changes, this will be noticed as a new test suite failure.
Thus, these environment variables to not run into the danger of still
containing tests that were already fixed.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 29b90ea85..1a42cc655 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -95,8 +95,19 @@ fedora autotools build:
stage: 'test'
script:
- ./autogen.sh
- # Ignore test suite failures with CAIRO_TEST_FORCE_PASS=1
- - make check CAIRO_TEST_FORCE_PASS=1 VERBOSE=1
+ # Current test failures that we ignore for now
+ - export CAIRO_TEST_UGLY_HACK_TO_IGNORE_FALLBACK_RESOLUTION=1
+ - export CAIRO_TEST_UGLY_HACK_TO_IGNORE_SCRIPT_XCB_HUGE_IMAGE_SHM=1
+ - export CAIRO_TEST_IGNORE_pdf_argb32=bug-image-compositor,clear-source,clip-operator,clip-text,culled-glyphs,extended-blend,extended-blend-solid,fallback,filter-bilinear-extents,filter-nearest-offset,filter-nearest-transformed,font-matrix-translation,glyph-cache-pressure,halo,halo-transform,inverse-text,large-font,linear-gradient-reflect,mask,operator-alpha-alpha,overlapping-glyphs,paint-with-alpha-clip,partial-clip-text-bottom,partial-clip-text-left,pixman-downscale-fast-95,pixman-downscale-fast-24,pixman-downscale-good-24,pixman-downscale-best-95,pixman-downscale-best-24,pixman-downscale-nearest-95,pixman-downscale-nearest-24,pixman-downscale-bilinear-24,radial-gradient,radial-gradient-mask,radial-gradient-source,radial-gradient-mask-source,radial-gradient-one-stop,record-select-font-face,record1414x-select-font-face,record1414x-text-transform,record2x-select-font-face,record2x-text-transform,record90-select-font-face,recordflip-whole-select-font-face,recordflip-select-font-f
ace,record-replay-extend-repeat,record-replay-extend-reflect,recording-surface-over,recording-surface-extend-repeat,recording-surface-extend-reflect,rectilinear-miter-limit,rectilinear-dash,rectilinear-stroke,rotate-image-surface-paint,rotate-clip-image-surface-paint,select-font-face,self-copy,show-glyphs-advance,show-text-current-point,smask-text,smp-glyph,surface-pattern,surface-pattern-operator,surface-pattern-scale-down,text-glyph-range,text-pattern,text-rotate,text-transform,text-unhinted-metrics,thin-lines,trap-clip,twin,user-font-proxy,user-font-rescale,pthread-same-source,pthread-show-text,ft-show-glyphs-positioning,ft-show-glyphs-table,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3
+ - export CAIRO_TEST_IGNORE_pdf_rgb24=bug-image-compositor,clear-source,clip-text,culled-glyphs,extended-blend-alpha-mask,extended-blend-solid,filter-bilinear-extents,filter-nearest-offset,filter-nearest-transformed,font-matrix-translation,glyph-cache-pressure,halo,halo-transform,inverse-text,large-font,linear-gradient-reflect,mask,operator-alpha-alpha,overlapping-glyphs,paint-with-alpha-clip,partial-clip-text-bottom,partial-clip-text-left,pixman-downscale-fast-95,pixman-downscale-fast-24,pixman-downscale-good-24,pixman-downscale-best-95,pixman-downscale-best-24,pixman-downscale-nearest-95,pixman-downscale-nearest-24,pixman-downscale-bilinear-24,radial-gradient,radial-gradient-mask,radial-gradient-source,radial-gradient-mask-source,radial-gradient-one-stop,random-intersections-curves-eo,random-intersections-curves-nz,record-paint-alpha-clip,record-select-font-face,record-text-transform,record1414x-paint-alpha,record1414x-paint-alpha-clip,record1414x-paint-alpha-clip-mask,record14
14x-select-font-face,record1414x-text-transform,record2x-paint-alpha-clip-mask,record2x-select-font-face,record2x-text-transform,record90-paint-alpha-clip,record90-paint-alpha-clip-mask,record90-select-font-face,record90-text-transform,recordflip-whole-select-font-face,recordflip-whole-self-intersecting,recordflip-whole-text-transform,recordflip-select-font-face,recordflip-text-transform,record-replay-extend-repeat,record-replay-extend-reflect,recording-surface-over,recording-surface-extend-repeat,rectilinear-miter-limit,rectilinear-dash,rectilinear-stroke,rel-path,rotate-image-surface-paint,rotate-clip-image-surface-paint,select-font-face,self-copy,show-glyphs-advance,show-text-current-point,smask-text,smp-glyph,surface-pattern,surface-pattern-scale-down,text-glyph-range,text-pattern,text-rotate,text-transform,text-unhinted-metrics,trap-clip,twin,user-font-proxy,user-font-rescale,pthread-same-source,pthread-show-text,ft-show-glyphs-positioning,ft-show-glyphs-table,ft-text-vertical-
layout-type1,ft-text-vertical-layout-type3
+ - export CAIRO_TEST_IGNORE_script_argb32=xcb-huge-image-shm
+ - export CAIRO_TEST_IGNORE_script_argb32=a1-bug,a1-fill,arc-looping-dash,bilevel-image,bug-51910,bug-84115,bug-seams,caps,caps-2,caps-1,caps-05,checkerboard,caps-joins-2,caps-joins-1,caps-joins-05,caps-joins-curve,caps-tails-curve,caps-sub-paths,clear-source,clip-disjoint-quad,clip-device-offset,clip-image,clip-mixed-antialias,clip-push-group,clip-polygons,clip-text,close-path,close-path-current-point,composite-integer-translate-over-repeat,copy-path,coverage-rectangles,coverage-intersecting-quads,coverage-intersecting-triangles,coverage-abutting,culled-glyphs,dash-caps-joins,dash-curve,dash-infinite-loop,dash-scale,dash-state,degenerate-curve-to,degenerate-linear-gradient,degenerate-pen,degenerate-radial-gradient,degenerate-rel-curve-to,device-offset-scale,extend-pad-border,fill-and-stroke-alpha,fill-and-stroke-alpha-add,filter-bilinear-extents,font-matrix-translation,glyph-cache-pressure,halo,halo-transform,huge-radial,image-surface-source,infinite-join,inverse-text,joins,larg
e-font,large-source,large-twin-antialias-mixed,leaky-dashed-rectangle,leaky-dashed-stroke,leaky-polygon,line-width-scale,line-width-tolerance,linear-gradient-extend,linear-gradient-reflect,long-dashed-lines,map-all-to-image,map-bit-to-image,map-to-image-fill,mask-transformed-image,mask-transformed-similar,mesh-pattern,mesh-pattern-conical,mesh-pattern-control-points,mesh-pattern-fold,mesh-pattern-overlap,mesh-pattern-transformed,negative-stride-image,operator-alpha-alpha,overlapping-glyphs,paint-source-alpha,paint-with-alpha,paint-with-alpha-solid-clip,paint-with-alpha-clip,partial-clip-text-bottom,partial-clip-text-left,partial-coverage-reference,partial-coverage-three-quarter-reference,partial-coverage-half-reference,path-stroke-twice,push-group-color,radial-gradient,radial-gradient-mask,radial-gradient-source,radial-gradient-mask-source,radial-gradient-one-stop,radial-gradient-extend,record-paint-alpha-solid-clip,record-paint-alpha-clip,record-select-font-face,record-text-transfo
rm,record1414x-paint-alpha,record1414x-paint-alpha-solid-clip,record1414x-paint-alpha-clip,record1414x-select-font-face,record1414x-text-transform,record2x-paint-alpha,record2x-paint-alpha-solid-clip,record2x-paint-alpha-clip,record2x-select-font-face,record2x-text-transform,record90-paint-alpha-clip-mask,record90-select-font-face,record90-text-transform,recordflip-whole-select-font-face,recordflip-whole-text-transform,recordflip-select-font-face,recordflip-text-transform,record-neg-extents-bounded,record-mesh,record-replay-extend-none,record-replay-extend-repeat,record-replay-extend-reflect,record-replay-extend-pad,recording-surface-over,recording-surface-source,recording-surface-extend-none,recording-surface-extend-repeat,recording-surface-extend-reflect,rectilinear-miter-limit,reflected-stroke,scale-offset-image,scale-offset-similar,stroke-ctm-caps,select-font-face,self-copy,show-glyphs-advance,show-text-current-point,shape-sierpinski,smask,smask-image-mask,smask-mask,smask-paint
,smask-text,stride-12-image,subsurface,subsurface-scale,surface-pattern,surface-pattern-scale-up,text-antialias-gray,text-antialias-subpixel,text-antialias-subpixel-rgb,text-antialias-subpixel-bgr,text-antialias-subpixel-vrgb,text-antialias-subpixel-vbgr,text-glyph-range,text-pattern,text-rotate,text-transform,text-unhinted-metrics,transforms,twin,twin-antialias-gray,twin-antialias-mixed,twin-antialias-none,twin-antialias-subpixel,unclosed-strokes,user-font,user-font-proxy,user-font-rescale,world-map,world-map-stroke,world-map-fill,xcb-stress-cache,xcomposite-projection,pthread-show-text,bitmap-font,ft-show-glyphs-positioning,ft-show-glyphs-table,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3,ft-text-antialias-none,pdf-surface-source,ps-surface-source,svg-surface-source
+ - export CAIRO_TEST_IGNORE_image_argb32=clip-text,culled-glyphs,halo-transform,inverse-text,overlapping-glyphs,radial-gradient-source,record-select-font-face,record1414x-select-font-face,record1414x-text-transform,record2x-select-font-face,record90-select-font-face,recordflip-whole-select-font-face,recordflip-select-font-face,select-font-face,show-glyphs-advance,subsurface,subsurface-scale,text-antialias-subpixel,text-antialias-subpixel-rgb,text-antialias-subpixel-bgr,text-antialias-subpixel-vrgb,text-antialias-subpixel-vbgr,text-pattern,text-rotate,text-unhinted-metrics,user-font-rescale,pthread-show-text,ft-show-glyphs-positioning,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3
+ - export CAIRO_TEST_IGNORE_image_rgb24=clip-text,culled-glyphs,extended-blend-alpha-mask,halo-transform,inverse-text,overlapping-glyphs,radial-gradient-source,record-select-font-face,record1414x-select-font-face,record1414x-text-transform,record2x-select-font-face,record90-select-font-face,recordflip-whole-select-font-face,recordflip-select-font-face,select-font-face,show-glyphs-advance,subsurface,subsurface-scale,text-antialias-subpixel,text-antialias-subpixel-rgb,text-antialias-subpixel-bgr,text-antialias-subpixel-vrgb,text-antialias-subpixel-vbgr,text-pattern,text-rotate,text-unhinted-metrics,user-font-rescale,pthread-show-text,ft-show-glyphs-positioning,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3
+ - export CAIRO_TEST_IGNORE_image16_rgb24=a1-bug,aliasing,arc-direction,arc-looping-dash,big-line,bug-spline,bug-84115,bug-bo-ricotz,bug-source-cu,bug-extents,bug-seams,bug-image-compositor,caps,caps-2,caps-05,caps-joins-2,caps-joins-alpha,caps-joins-curve,caps-tails-curve,clear-source,clip-disjoint,clip-disjoint-quad,clip-stroke-unbounded,clip-fill-nz-unbounded,clip-fill-eo-unbounded,clip-fill,clip-image,clip-intersect,clip-operator,clip-push-group,clip-shape,clip-stroke,clip-text,clip-twice,close-path-current-point,copy-path,coverage-rectangles,coverage-rhombus,coverage-intersecting-quads,coverage-intersecting-triangles,coverage-row-triangles,coverage-column-triangles,coverage-triangles,coverage-abutting,culled-glyphs,dash-caps-joins,dash-curve,dash-scale,dash-state,dash-zero-length,degenerate-arc,degenerate-curve-to,degenerate-path,degenerate-pen,degenerate-rel-curve-to,drunkard-tails,extend-pad-border,extended-blend,extended-blend-alpha,extended-blend-mask,extended-blend-alph
a-mask,extended-blend-solid,extended-blend-solid-alpha,fallback,fill-alpha,fill-alpha-pattern,fill-and-stroke,fill-and-stroke-alpha,fill-and-stroke-alpha-add,fill-degenerate-sort-order,fill-image,fill-missed-stop,fill-rule,filter-bilinear-extents,finer-grained-fallbacks,font-matrix-translation,glyph-cache-pressure,gradient-alpha,gradient-constant-alpha,group-unaligned,halo,halo-transform,hatchings,huge-linear,huge-radial,inverse-text,joins,joins-loop,joins-star,joins-retrace,large-font,large-twin-antialias-mixed,leaky-dashed-stroke,line-width-overlap-offset,line-width-scale,linear-gradient,linear-gradient-reflect,linear-gradient-subset,long-dashed-lines,mask,mask-alpha,mask-ctm,mask-surface-ctm,mask-transformed-image,mask-transformed-similar,mesh-pattern,mesh-pattern-conical,mesh-pattern-control-points,mesh-pattern-fold,mesh-pattern-overlap,mesh-pattern-transformed,new-sub-path,operator-source,over-around-source,overlapping-boxes,overlapping-glyphs,overlapping-dash-caps,paint-source
-alpha,paint-with-alpha,paint-with-alpha-clip,paint-with-alpha-clip-mask,partial-coverage-reference,partial-coverage-three-quarter-reference,pass-through,path-append,path-stroke-twice,pdf-isolated-group,pixman-downscale-fast-96,pixman-downscale-good-96,pixman-downscale-best-96,pixman-downscale-best-24,pixman-downscale-nearest-96,pixman-downscale-bilinear-96,pixman-rotate,push-group,push-group-color,radial-gradient,radial-gradient-mask,radial-gradient-source,radial-gradient-mask-source,random-clip,random-intersections-eo,random-intersections-nonzero,random-intersections-curves-eo,random-intersections-curves-nz,raster-source,record-paint-alpha,record-paint-alpha-clip,record-paint-alpha-clip-mask,record-fill-alpha,record-select-font-face,record-text-transform,record1414x-paint-alpha,record1414x-paint-alpha-clip,record1414x-paint-alpha-clip-mask,record1414x-fill-alpha,record1414x-select-font-face,record1414x-text-transform,record2x-paint-alpha,record2x-paint-alpha-clip,record2x-paint-al
pha-clip-mask,record2x-fill-alpha,record2x-select-font-face,record2x-text-transform,record90-paint-alpha,record90-paint-alpha-clip,record90-paint-alpha-clip-mask,record90-fill-alpha,record90-select-font-face,record90-text-transform,recordflip-whole-paint-alpha,recordflip-whole-paint-alpha-clip,recordflip-whole-paint-alpha-clip-mask,recordflip-whole-fill-alpha,recordflip-whole-select-font-face,recordflip-whole-text-transform,recordflip-paint-alpha,recordflip-paint-alpha-clip,recordflip-paint-alpha-clip-mask,recordflip-fill-alpha,recordflip-select-font-face,recordflip-text-transform,record-neg-extents-unbounded,record-neg-extents-bounded,record-mesh,record-replay-extend-repeat,record-replay-extend-reflect,record-replay-extend-pad,recording-surface-over,recording-surface-source,recording-surface-extend-none,recording-surface-extend-repeat,recording-surface-extend-reflect,rectilinear-dash-scale-unaligned,reflected-stroke,rel-path,rotate-clip-image-surface-paint,rotated-clip,rounded-rect
angle-fill,rounded-rectangle-stroke,scale-offset-image,scale-offset-similar,stroke-ctm-caps,stroke-image,select-font-face,set-source,show-glyphs-advance,show-text-current-point,shape-general-convex,shape-sierpinski,simple-edge,smask,smask-fill,smask-mask,smask-paint,smask-stroke,smask-text,spline-decomposition,stroke-pattern,subsurface,subsurface-scale,surface-pattern,surface-pattern-operator,surface-pattern-scale-down,surface-pattern-scale-up,text-antialias-gray,text-antialias-subpixel,text-antialias-subpixel-rgb,text-antialias-subpixel-bgr,text-antialias-subpixel-vrgb,text-antialias-subpixel-vbgr,text-glyph-range,text-pattern,text-rotate,text-transform,text-unhinted-metrics,tighten-bounds,tiger,a1-tiger,transforms,trap-clip,twin,twin-antialias-gray,twin-antialias-mixed,twin-antialias-subpixel,unbounded-operator,unclosed-strokes,user-font,user-font-mask,user-font-proxy,user-font-rescale,world-map,world-map-stroke,world-map-fill,xcb-huge-image-shm,xcb-huge-subimage,xcomposite-projec
tion,pthread-same-source,pthread-show-text,ft-show-glyphs-positioning,ft-show-glyphs-table,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3
+ - export CAIRO_TEST_IGNORE_recording_argb32=bug-source-cu,clear-source,clip-text,coverage-rectangles,culled-glyphs,finer-grained-fallbacks,halo-transform,inverse-text,overlapping-glyphs,radial-gradient-source,record-select-font-face,record1414x-fill-alpha,record1414x-select-font-face,record1414x-text-transform,record2x-paint-alpha-clip-mask,record2x-fill-alpha,record2x-select-font-face,record2x-text-transform,record90-select-font-face,recordflip-whole-select-font-face,recordflip-select-font-face,recording-surface-over,recording-surface-source,recording-surface-extend-none,recording-surface-extend-repeat,recording-surface-extend-reflect,scale-offset-similar,select-font-face,show-glyphs-advance,subsurface,subsurface-scale,text-antialias-subpixel,text-antialias-subpixel-rgb,text-antialias-subpixel-bgr,text-antialias-subpixel-vrgb,text-antialias-subpixel-vbgr,text-pattern,text-rotate,text-unhinted-metrics,user-font-rescale,pthread-same-source,pthread-show-text,ft-show-glyphs-positio
ning,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3
+ - export CAIRO_TEST_IGNORE_recording_rgb24=bug-source-cu,clear-source,clip-text,coverage-rectangles,culled-glyphs,extended-blend-alpha-mask,finer-grained-fallbacks,halo-transform,inverse-text,overlapping-glyphs,radial-gradient-source,record-select-font-face,record1414x-fill-alpha,record1414x-select-font-face,record1414x-text-transform,record2x-paint-alpha-clip-mask,record2x-fill-alpha,record2x-select-font-face,record2x-text-transform,record90-select-font-face,recordflip-whole-select-font-face,recordflip-select-font-face,recording-surface-over,recording-surface-source,recording-surface-extend-none,recording-surface-extend-repeat,recording-surface-extend-reflect,scale-offset-similar,select-font-face,show-glyphs-advance,subsurface,subsurface-scale,text-antialias-subpixel,text-antialias-subpixel-rgb,text-antialias-subpixel-bgr,text-antialias-subpixel-vrgb,text-antialias-subpixel-vbgr,text-pattern,text-rotate,text-unhinted-metrics,user-font-rescale,pthread-same-source,pthread-show-te
xt,ft-show-glyphs-positioning,ft-text-vertical-layout-type1,ft-text-vertical-layout-type3
+ - make check V=1 VERBOSE=1
artifacts:
when: 'always'
expire_in: "7 days"
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index 551a4e072..c3f12a300 100644
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -72,6 +72,8 @@ typedef struct _cairo_test_runner {
int num_error;
int num_crashed;
+ unsigned int num_ignored_via_env;
+
cairo_test_list_t *crashes_preamble;
cairo_test_list_t *errors_preamble;
cairo_test_list_t *fails_preamble;
@@ -439,6 +441,11 @@ _runner_print_summary (cairo_test_runner_t *runner)
runner->num_xfailed,
runner->num_skipped);
+ if (runner->num_ignored_via_env) {
+ _log (&runner->base,
+ "%d expected failure due to special request via environment variables!\n",
+ runner->num_ignored_via_env);
+ }
}
static void
@@ -596,6 +603,61 @@ _runner_fini (cairo_test_runner_t *runner)
CAIRO_TEST_SUCCESS : CAIRO_TEST_UNTESTED;
}
+static cairo_bool_t
+expect_fail_due_to_env_var (cairo_test_context_t *ctx,
+ const cairo_boilerplate_target_t *target)
+{
+ const char *prefix = "CAIRO_TEST_IGNORE_";
+ const char *content = cairo_boilerplate_content_name (target->content);
+ char *env_name;
+ const char *env;
+ cairo_bool_t result = FALSE;
+
+ /* Construct the name of the env var */
+ env_name = malloc (strlen (prefix) + strlen (target->name) + 1 + strlen (content) + 1);
+ if (env_name == NULL) {
+ fprintf(stderr, "Malloc failed, cannot check $%s%s_%s\n", prefix, target->name, content);
+ cairo_test_log(ctx, "Malloc failed, cannot check $%s%s_%s\n", prefix, target->name, content);
+ return FALSE;
+ }
+ strcpy (env_name, prefix);
+ strcat (env_name, target->name);
+ strcat (env_name, "_");
+ strcat (env_name, content);
+
+ env = getenv (env_name);
+
+ /* Look for the test name in the env var (comma separated) */
+ if (env) {
+ while (1) {
+ char *match = strstr (env, ctx->test_name);
+ if (!match)
+ break;
+
+ /* Make sure that "foo" does not match in "barfoo,foobaz"
+ * There must be commas around the test name (or string begin/end)
+ */
+ if (env == match || match[-1] == ',') {
+ char *end = match + strlen (ctx->test_name);
+ if (*end == '\0' || *end == ',') {
+ result = TRUE;
+ break;
+ }
+ }
+ env = match + strlen (ctx->test_name);
+ }
+ }
+ if (result)
+ cairo_test_log (ctx,
+ "Expecting '%s' to fail because it appears in $%s\n",
+ ctx->test_name, env_name);
+
+ free (env_name);
+
+ return result;
+}
+
+
static cairo_bool_t
_version_compare (int a, cairo_test_compare_op_t op, int b)
{
@@ -872,6 +934,18 @@ 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_FALLBACK_RESOLUTION") && 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 remove the hack to ignore fallback-resolution failures.\n");
+ status = CAIRO_TEST_ERROR;
+ }
+ }
switch (status) {
case CAIRO_TEST_SUCCESS:
in_preamble = TRUE;
@@ -937,6 +1011,33 @@ main (int argc, char **argv)
for (similar = DIRECT; similar <= has_similar; similar++) {
status = _cairo_test_runner_draw (&runner, &ctx, target,
similar, dev_offset, dev_scale);
+
+ if (expect_fail_due_to_env_var (&ctx, target)) {
+ 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;
+ }
+ }
+ 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) {
+ 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 remove the hack to ignore xcb-huge-image-shm errors for the script backend.\n");
+ status = CAIRO_TEST_ERROR;
+ }
+ }
+ }
switch (status) {
case CAIRO_TEST_SUCCESS:
target_skipped = FALSE;
More information about the cairo-commit
mailing list