Commit graph

31 commits

Author SHA1 Message Date
Luca Bacci
ce3a3e2d27 CI: Run tests on Windows 2026-01-08 15:32:30 +01:00
Luca Bacci
a9e3eaccb8 CI: Add coverage-column-triangles to Quartz ignores
Fails with the following log:

Testing coverage-column-triangles with quartz target (dev offset 0 scale: 1)
963 pixels differ (with maximum difference of 9) from reference image
963 pixels differ (with maximum difference of 9) from reference image
OUTPUT: output/coverage-column-triangles.quartz.argb32.out.png
REFERENCE: ../../test/reference/coverage-column-triangles.ref.png
DIFFERENCE: output/coverage-column-triangles.quartz.argb32.diff.png
TEST: coverage-column-triangles TARGET: quartz FORMAT: argb32 OFFSET: 0 SCALE: 1 SIMILAR: 0 RESULT: FAIL
(...)
2025-07-16 11:52:45 +02:00
Jordan Petridis
0826837e4a ci: Install android toolchain into our own image
Previously we were using a prebuilt image from
gstreamer, but now we can copy what's needed and build
our own image with ci-templates.
2025-03-26 10:18:13 +00:00
Jordan Petridis
3a3771f862 ci: Update the android CI image
Switch to using the gstreamer/cerbero image that
has NDK installed, until we add the android toolchain
to our image.

Followup to 92dde935d4
2025-03-26 10:18:13 +00:00
Jordan Petridis
8c67cb8e2d ci: Move the android cross file into the repository
Avoid having the txt file be inline bash which is inline
in yaml in the ci config.
2025-03-26 10:18:13 +00:00
Federico Mena Quintero
3f709d0050 Add a landing page for GitLab pages
GitLab pages for cairo appear in
https://cairo.pages.freedesktop.org/cairo/ but there is nothing there
right now, so it gives a 404.  Only
https://cairo.pages.freedesktop.org/cairo/coverage works so far.

So, add public/index.html as a minimal landing page.  My intention is
to link other things from there - an HTMLized report of the test
suite, a development guide, things like that.
2024-09-05 10:09:26 -06:00
Federico Mena Quintero
744f4d75b3 CI: Add a basic test coverage job
Later we'll add one coverage job per backend, and aggregate all of the
results at the end for the coverage report.
2024-08-27 21:18:10 -06:00
Federico Mena Quintero
b5c6ef2853 CI: Install rust and grcov
The Rust toolchain is so that we can build and install grcov, which is
Mozilla's tool to aggregate test coverage data into a report.
2024-08-27 21:15:38 -06:00
Adrian Johnson
c381a773de Update CI to Fedora 38 2023-06-05 22:04:33 +09:30
John Ralls
198d1792cf [quartz] Cleanup and make better use of cairo_quartz_image_surface_t.
Use a CGBitmapContext mapping the underlying image surface's data instead
of maintaining a CGImage. Generalize the quartz surface snapshot mechanism
to work with both cairo_quartz_surface_t and cairo_quartz_image_surface_t
and to use the latter to get a CGContext around non-quartz surfaces.
Use this snapshot machanism to get a CGImageRef when needed from a
cairo_quartz_image_surface_t.
2023-02-14 11:52:57 -08:00
Adrian Johnson
6b2a9a0f77 Remove the test ignore that was unintentionaly committed in !380 2023-01-03 18:43:02 +10:30
Adrian Johnson
f0ce8658f9 Fix user-font with foreground in group failures on image, PDF, and PS 2023-01-03 17:37:36 +10:30
Uli Schlachter
4913f07950 Merge branch 'round-join' into 'master'
Remove `round-join-bug-520*` CI exceptions for Quartz backend

See merge request cairo/cairo!377
2022-12-29 12:37:01 +00:00
Christian Rohlfs
aa8d16ab83 Removed round-join-bug-520* CI exceptions for Quartz backend
Removed lines from `.gitlab-ci/ignore-quartz*`;
Added `round-join-bug-520-bevel.quartz.ref.png` file.
2022-12-28 17:50:27 +05:00
Uli Schlachter
a2d05a0c34 ps: Fix crash in self-copy-overlap
According to valgrind, there is a use-after-free here. The function
_cairo_ps_surface_emit_surface() temporarily replaces some member of a
struct and then later re-sets it. However, there is an early return
possible that would skip that part of the code.

This commit moves the re-set up so that no freed pointers are left
behind. This seems to fix the crash.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-12-28 11:15:01 +01:00
Uli Schlachter
c1aaaff880 Test cairo-ps in CI
This adds the necessary dependencies for testing cairo-ps to CI and sets
up jobs for testing the ps2 and ps3 backends.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-12-28 11:14:59 +01:00
Christian Rohlfs
805897b1f7 test: Add new round-join-bug-520 tests
https://gitlab.freedesktop.org/cairo/cairo/-/issues/520
2022-12-28 06:52:29 +05:00
John Ralls
04cf47b57a Change expected fails and reference image so that Quartz CI passes. 2022-11-17 16:20:14 -08:00
Uli Schlachter
21d7198bef Merge branch 'fix-rgb24-tests' into 'master'
Fix clip-unbounded and alpha-similar in CI

See merge request cairo/cairo!301
2022-05-29 05:29:57 +00:00
Uli Schlachter
9136454629 Merge branch 'fix-clip-unbounded' into 'master'
Add missing ref image for clip-unbounded

See merge request cairo/cairo!261
2022-05-29 05:28:32 +00:00
Adrian Johnson
9fadf0a116 Update huge-linear and huge-radial pdf ref images
pdf output is correct but the poppler rendering is incorrect
2022-05-28 18:25:08 +09:30
Uli Schlachter
63973958bc Add an rgb24 ref image for alpha similar
This commit copies the current alpha-similar.image.rgb24.out.png to
alpha-similar.rgb24.ref.png to make the test pass.

This failure goes back to commits 6647511 / 049060 which changed the
image comparison in the test suite. Previously, transparent "nothing"
and black compared equal, but said commits fixed that. Thus, having a
special reference image with black instead of transparency is the right
fix.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-03-13 16:14:48 +01:00
Adrian Johnson
5018120af0 Update ref images 2022-03-05 11:51:55 +10:30
John Ralls
76e6a0ddf7 [quartz] Remove cached image_surface on quartz surfaces.
Caching doesn't really do anything and removing it provides a 50%
speedup and gets pdf-operators-text to pass on argb32.
2022-02-24 17:00:07 -08:00
Uli Schlachter
d6180c2457 Add missing ref image for clip-unbounded
This commit copies clip-unbounded.base.rgb24.ref.png to
clip-unbounded.rgb24.ref.png. This makes the test pass for rgb24
targets.

This failure goes back to commits 6647511 / 049060 which changed the
image comparison in the test suite. Previously, transparent "nothing"
and black compared equal, but said commits fixed that. Thus, having a
special reference image with black instead of transparency is the right
fix.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-10-19 18:41:47 +02:00
Manuel Stoeckl
6647511593 test: explicitly handle image formats in buffer_diff_core
In practice, the A and B images may be any mixture of RGB24 and
ARGB32 formats, so this change accepts all combinations of these
types, and converts the pixel values to a common (ARGB32) format
as needed.

Some of the newly added test failures are cases where the image
output is RGB24, but the matching reference image is ARGB32 with
noticeable transparency. Some of the newly passing tests are cases
where the unused 'alpha' channel of an RGB24 image was not equal
to 0xff, and the previous code had incorrectly used this channel
in max_diff calculations.
2021-08-29 11:57:30 -04:00
Manuel Stoeckl
0490607584 pdiff: convert RGB24 image values to ARGB32 on read
To avoid reading a potentially garbage alpha channel when users
of pdiff_compare pass in RGB24 images, if the format is RGB24,
force the alpha channel to be 0xff.

This commit also updates CI to adjust for the new tests that have
started/stopped failing. New failures often are cases where
the reference image has alpha transparency, but the test output
does not; new passing tests may indicate that the unused alpha
channel of an RGB24 image was garbage, but now is ignored.
2021-08-29 11:56:27 -04:00
Manuel Stoeckl
a8012953ed ci: sort lists of ignored tests 2021-08-29 11:54:36 -04:00
Uli Schlachter
47c70d53e4 Switch to line-separated test failure lists
Having comma separated lists of test names that we expect to fail leads
to really unreadable and useless diffs. Thus, this commit changes these
lists to be separated by newlines. This change was generated with:

  ( cd .gitlab-ci ; for x in * ; do tr ',' '\n' < $x > .$x ; mv .$x $x ; done )

The code in .gitlab-ci.yml is changed to use tr again to transfer these
lists back so that everything still works.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-03 17:19:17 +02:00
Uli Schlachter
9c9883cac0 Rename a file
Because shell variables cannot contain &, this character was replaced
with an underscore in the shell variable. However, we can have this
character just fine in the file name. Thus, this commits renames a file
to actually include the proper name of the boilerplate target, which is
xcb-window&.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-03 17:13:57 +02:00
Uli Schlachter
04697b33af Move test failure lists into separate files
Before this commit, .gitlab-ci.yml is way too large, because it contains
the list with all the expected test failure. This commit moves those
lists to extra files.

The files were generated with a shell one-liner:

  grep CAIRO_TEST_IGNORE .gitlab-ci.yml | while read line ; do
  backend=$(echo $line | cut -f 3 -d ' ' | cut -f1 -d= | sed -e
  's/CAIRO_TEST_IGNORE_//;s/_/-/g') ; content=$(echo $line | cut -f2-
  -d=) ; echo $backend ; echo $content >
  .gitlab-ci/ignore-${backend}.txt ; done

The changes to .gitlab-ci.yml were also generated with some shell
scripting that generates a sed argument:

  grep CAIRO_TEST_IGNORE .gitlab-ci.yml | while read line ; do
  backend=$(echo $line | cut -f 3 -d ' ' | cut -f1 -d= ) ; file=$(echo
  $backend | sed -e 's/CAIRO_TEST_IGNORE_//;s/_/-/g') ; printf
  "/$backend/s#=.*#=\$(cat .gitlab-ci/ignore-${file}.txt)#;"; done ;
  echo

The above can then be applied via (but of course adding ' around it and
I also left out the final ;):

  sed -i -e [the output of the above] .gitlab-ci.yml

Just for completeness, [the output of the above] is:

  /CAIRO_TEST_IGNORE_pdf_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-pdf-argb32.txt)#;/CAIRO_TEST_IGNORE_pdf_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-pdf-rgb24.txt)#;/CAIRO_TEST_IGNORE_script_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-script-argb32.txt)#;/CAIRO_TEST_IGNORE_image_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-image-argb32.txt)#;/CAIRO_TEST_IGNORE_image_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-image-rgb24.txt)#;/CAIRO_TEST_IGNORE_image16_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-image16-rgb24.txt)#;/CAIRO_TEST_IGNORE_recording_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-recording-argb32.txt)#;/CAIRO_TEST_IGNORE_recording_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-recording-rgb24.txt)#;/CAIRO_TEST_IGNORE_svg11_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-svg11-argb32.txt)#;/CAIRO_TEST_IGNORE_svg11_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-svg11-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-argb32.txt)#;/CAIRO_TEST_IGNORE_xcb_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_window_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-window-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_window__rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-window--rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_render_0_0_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-render-0-0-argb32.txt)#;/CAIRO_TEST_IGNORE_xcb_render_0_0_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-render-0-0-rgb24.txt)#;/CAIRO_TEST_IGNORE_xcb_fallback_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xcb-fallback-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-argb32.txt)#;/CAIRO_TEST_IGNORE_xlib_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_window_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-window-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_render_0_0_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-render-0-0-rgb24.txt)#;/CAIRO_TEST_IGNORE_xlib_fallback_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-xlib-fallback-rgb24.txt)#;/CAIRO_TEST_IGNORE_quartz_argb32/s#=.*#=$(cat
  .gitlab-ci/ignore-quartz-argb32.txt)#;/CAIRO_TEST_IGNORE_quartz_rgb24/s#=.*#=$(cat
  .gitlab-ci/ignore-quartz-rgb24.txt)#;

(All line breaks are only added for readability and are not part of the
one-liners)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-06-03 17:09:08 +02:00