[cairo-commit] 2 commits - .gitlab-ci.yml src/cairo-svg-surface.c test/cairo-test-runner.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jul 25 03:21:05 UTC 2021


 .gitlab-ci.yml           |    1 -
 src/cairo-svg-surface.c  |    2 +-
 test/cairo-test-runner.c |   12 ------------
 3 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 908b243ab8e31db4ec18e40afc4aae525a8c3a14
Merge: 099d71fb9 4c6b604bd
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Jul 25 03:21:03 2021 +0000

    Merge branch 'svg-create-for-stream' into 'master'
    
    svg: Fix create-for-stream test case
    
    See merge request cairo/cairo!212

commit 4c6b604bd512c2619c69c7f2afb9481ab756bf85
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Jul 24 14:42:26 2021 +0200

    svg: Fix create-for-stream test case
    
    Commit 2fbd53 added another test to create-for-stream that failed for
    cairo-pdf. Manual testing shows that this test also fails for cairo-svg.
    However, this was not noticed because even before this addition to the
    test, create-for-stream already failed for cairo-svg. Since the
    introduction on CI was done based on "let's ignore all current
    failures", this hid the error.
    
    This commit applies the trivial fix for cairo-svg to make this test
    pass. It is basically the same error that cairo-pdf had.
    
    Additionally, this removes the hack to ignore create-for-stream failures
    in CI since it is now no longer necessary.
    
    Thanks to Knut Peterson for reporting this [0].
    
    [0]:
    https://lists.cairographics.org/archives/cairo/2021-July/029291.html
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b378c0556..ddfdeb773 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -166,7 +166,6 @@ test fedora autotools recording:
 test fedora autotools svg:
   extends: '.test fedora autotools'
   script:
-    - export CAIRO_TEST_UGLY_HACK_TO_IGNORE_CREATE_FOR_STREAM=1
     - export CAIRO_TEST_IGNORE_svg11_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-svg11-argb32.txt)
     - export CAIRO_TEST_IGNORE_svg11_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-svg11-rgb24.txt)
     - export CAIRO_TEST_TARGET=svg11
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 8baeecfc2..4abad60c1 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -4387,7 +4387,7 @@ _cairo_svg_document_finish (cairo_svg_document_t *document)
 	final_status = status;
     }
 
-    return CAIRO_STATUS_SUCCESS;
+    return final_status;
 }
 
 static cairo_int_status_t
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index 07240a4ec..05d04b78e 100644
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -942,18 +942,6 @@ 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_CREATE_FOR_STREAM") && strcmp (ctx.test_name, "create-for-stream") == 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 create-for-stream failures.\n");
-		    status = CAIRO_TEST_ERROR;
-		}
-	    }
 	    switch (status) {
 	    case CAIRO_TEST_SUCCESS:
 		in_preamble = TRUE;


More information about the cairo-commit mailing list