[cairo-commit] 5 commits - CODING_STYLE INSTALL meson.build src/cairo-svg-glyph-render.c src/win32 test/README test/svg

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 16 08:57:47 UTC 2023


 CODING_STYLE                         |    1 
 INSTALL                              |    2 -
 meson.build                          |    3 --
 src/cairo-svg-glyph-render.c         |    2 -
 src/win32/cairo-dwrite-font-public.c |    2 -
 src/win32/cairo-win32-font.c         |    1 
 test/README                          |   40 +++++++++++++++++++++++------------
 test/svg/fuzzer/meson.build          |    2 -
 8 files changed, 32 insertions(+), 21 deletions(-)

New commits:
commit 6abc8076c9cf06c1e2b92fccf57210442d471f5c
Merge: b23ecf632 d027f1507
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Jan 16 08:57:45 2023 +0000

    Merge branch 'meson-and-doc-fixes' into 'master'
    
    Meson and documentation fixes
    
    See merge request cairo/cairo!406

commit d027f15075dfc5d2386ae38e498965ff1169e7ef
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Jan 15 17:02:30 2023 +1030

    Documentation fixes

diff --git a/src/cairo-svg-glyph-render.c b/src/cairo-svg-glyph-render.c
index 9f9d9dafa..96094cbd2 100644
--- a/src/cairo-svg-glyph-render.c
+++ b/src/cairo-svg-glyph-render.c
@@ -3200,7 +3200,7 @@ _cairo_render_svg_glyph (const char           *svg_document,
  * @element: element within svg_document to render (eg "#glyph8"), or NULL to render entire document.
  * @debug_level: 0 - quiet, 1 - print errors, 2 - print warnings, 3 - info
  * @return TRUE on success, ie no errors, FALSE if error
- */
+ **/
 cairo_bool_t
 _cairo_debug_svg_render (cairo_t       *cr,
                          const char    *svg_document,
diff --git a/src/win32/cairo-dwrite-font-public.c b/src/win32/cairo-dwrite-font-public.c
index 09eddd51d..9a4c6a1a1 100644
--- a/src/win32/cairo-dwrite-font-public.c
+++ b/src/win32/cairo-dwrite-font-public.c
@@ -69,7 +69,7 @@
  * Creates a new font for the DWrite font backend based on a
  * DWrite font face. This font can then be used with
  * cairo_set_font_face() or cairo_scaled_font_create().
-
+ *
  * Here is an example of how this function might be used:
  * <informalexample><programlisting><![CDATA[
  * #include <cairo-win32.h>
diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c
index 9f81adff0..6bc8bef94 100644
--- a/src/win32/cairo-win32-font.c
+++ b/src/win32/cairo-win32-font.c
@@ -71,7 +71,6 @@
  *
  * Note: Win32 GDI fonts do not support color fonts. Use DWrite fonts
  * if color font support is required.
-
  **/
 
 /**
commit 5b13659d72d9b21c82bca64dae753f88d7719f9a
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Jan 14 10:34:22 2023 +1030

    Add emacs modeline to CODING_STYLE

diff --git a/CODING_STYLE b/CODING_STYLE
index 95ceac04d..7e96c36d1 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -281,6 +281,7 @@ popular editors:
 /*
  * vim:sw=4:sts=4:ts=8:tw=78:fo=tcroq:cindent:cino=\:0,(0
  * vim:isk=a-z,A-Z,48-57,_,.,-,>
+ * -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*-
  */
 
 
commit d5e8a8c02e49332833379629bff4133a4533077e
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Jan 14 10:29:58 2023 +1030

    We don't use HAVE_CONFIG_H anymore

diff --git a/meson.build b/meson.build
index fb5fd3a49..0faf8638e 100644
--- a/meson.build
+++ b/meson.build
@@ -97,9 +97,6 @@ endif
 
 add_project_arguments('-D_GNU_SOURCE', language: 'c')
 
-# Autotools compatibility
-add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
-
 # Make sure source directory hasn't been configured with autotools
 fs = import('fs')
 if fs.exists('config.h') or fs.exists('src/cairo-features.h') or fs.exists('src/cairo-supported-features.h')
diff --git a/test/svg/fuzzer/meson.build b/test/svg/fuzzer/meson.build
index 37e23a474..3e8f7b943 100644
--- a/test/svg/fuzzer/meson.build
+++ b/test/svg/fuzzer/meson.build
@@ -7,7 +7,7 @@ fuzz_args = ['-fsanitize=fuzzer,address']
 foreach target_name : fuzz_targets
   exe = executable(target_name, [target_name + '.c'],
   include_directories: [incbase, incsrc],
-  c_args: [fuzz_args, '-DHAVE_CONFIG_H'],
+  c_args: [fuzz_args],
   link_with: [libcairo],
   link_args: [fuzz_args, extra_link_args],
   dependencies: [deps, test_deps])
commit bdbc10077e02113d1494ae45e23a4744971c6aae
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Jan 14 10:19:46 2023 +1030

    README fixes

diff --git a/INSTALL b/INSTALL
index 252dcf737..222968049 100644
--- a/INSTALL
+++ b/INSTALL
@@ -44,4 +44,4 @@ The "-D" options can also be used with "meson setup"
 
 Tests
 -----
-Refer to test/README.meson
+Refer to test/README
diff --git a/test/README b/test/README
index 26b483973..e8b5ff6cc 100644
--- a/test/README
+++ b/test/README
@@ -2,12 +2,18 @@ How to use cairo's test suite
 =============================
 Using this test should be as simple as running:
 
-  meson test -C $builddir
+  meson test -C $builddir -v
 
 assuming that the cairo distribution in the directory above has been
 configured and built in $builddir. The test suite here will use the
 locally compiled library rather than installed version.
 
+The above command runs some source code as well as the rendering
+tests. All the rendering tests are in a single meson test named
+"cairo". It can be run with:
+
+  meson test -C $builddir -v cairo
+
 The results of the test suite run are summarized in an index.html file
 written to $builddir, which, when viewed in a web browser makes it
 quite easy to visually see any failed renderings alongside the
@@ -24,17 +30,24 @@ any release. See below for hints and rules governing the use of the suite.
 Running specific tests
 ----------------------
 During development it is desirable to only run a single test or groups
-of related tests. The test suite is built as a single binary,
-"cairo-test-suite", which allows you to choose individual or
-categories of tests to run.
+of related tests. Individual tests can be run by specifying the tests
+names as arguments to the cairo test.
 
-The cairo-test-suite executable needs to be run in $builddir/test in
-order to find the image conversion executables. Simply running the
-executable will run all tests. eg
+  meson test -v cairo --test-args "record-neg-extents-unbounded record-neg-extents-bounded"
+
+The test suite is built as a single binary, "cairo-test-suite", which
+can be run directly instead of via meson. This may be more convenient
+when specifying multiple test arguments. The executable needs to be
+run in $builddir/test in order to find the image conversion
+executables. Simply running the executable will run all tests. eg
 
   cd $builddir/test
   ./cairo-test-suite
 
+Normally the executable will use the locally compiled library. But if
+you have a LD_LIBRARY_PATH defined or built cairo with an -rpath, the
+executable may not link with the locally compiled library.
+
 Individual tests can be run be specifying the tests names as arguments
 to cairo-test-suite. For example, to run specific tests:
 
@@ -125,10 +138,10 @@ CAIRO_TEST_MODE
     CAIRO_TEST_MODE="full,foreground"
 
 CAIRO_TESTS
-  A list of test to run. This is equivalebt to listing the tests as
+  A list of test to run. This is equivalent to listing the tests as
   arguments to cairo=test-suite. eg
     CAIRO_TESTS="record-neg-extents-unbounded record-neg-extents-bounded"
-  The tests may be separated by anyh of " \t,:;".
+  The tests may be separated by any of " \t,:;".
 
 srcdir
   The test suite needs to find the "test" directory in the source
@@ -241,22 +254,23 @@ eg
 
 The recommended practice for creating reference images for a new test is:
 
-1. Create a <test name>.ref.png reference image from the *.image.argb32.out.png output.
+1. Create a <test name>.ref.png reference image from <test name>.image.argb32.out.png
+output.
 
 2. Push to gitlab and check the CI result.
 
-3. If the image target fails, copy the *.image.argb32.out.png output
+3. If the image target fails, copy the <test name>.image.argb32.out.png output
 from CI and use as the reference image.
 
 4. Once the image target passes in CI, check that the other targets
-pass. If any fail, create *.<target>.ref.png reference images if the
+pass. If any fail, create <test name>.<target>.ref.png reference images if the
 output appears correct.
 
 5. If a target output is incorrect, try to determine if the cairo
 target output is correct. eg view pdf files in Adobe Reader. If the
 cairo target output is correct, it can be assumed the image converson
 from target to png is buggy. File a bug against the conversion tool
-and create a *.<target>.xfail.png reference image.
+and create a <test name>.<target>.xfail.png reference image.
 
 In all cases, before creating a reference image from test output, the
 image should be viewed to ensure that it is correct.


More information about the cairo-commit mailing list