Benjamin Otte
2a7beb75e8
testsuite: Make offload test do actual diffs
...
We have a testutils.c version for that.
2024-11-05 02:45:37 +01:00
Benjamin Otte
bfbc3e7484
testsuite: Clarify error
...
200% is not a fractional scale, but it's still forbidden.
2024-11-05 02:45:37 +01:00
Benjamin Otte
2e8fac7789
testsuite: Make nodeparser use shared diffing code
...
We have a testutils.c version, use that one.
2024-11-05 01:07:22 +01:00
Benjamin Otte
dd93aa9f50
testsuite: Rewrite diff_with_file()
...
use the modern version using GSubprocess that already exists in
node-parser.
Also change from one function to two - so tests can diff GBytes and
strings, depending on which they prefer.
2024-11-05 01:07:22 +01:00
Benjamin Otte
6cd98bae3b
testsuite: Add --strip-trailing-cr to diff call
...
On Windows, git defaults to maintaining line endings, which means it
changed \n to \r\n on all files it identifies as text. And that includes
our test output.
Luckily diff(1) has an option to undo that. And since we do not care
about line endings in those tests, we can just use it.
2024-11-04 22:02:28 +01:00
Benjamin Otte
d2930695ca
testsuite: Allow renderers in misc test to fail
...
When GL or Vulkan is not supported, the test should not fail.
It would be nicer if we could detect GL/Vulkan not being available
otherwise, but I'm not aware of a better solution, in particular because
rendeers might have stricter requirements than GTK itself.
So this is the next best fix.
2024-10-29 00:46:54 +01:00
Benjamin Otte
1b33e2c3b2
Revert "testsuite: Fix introspection test on Windows"
...
This change is no longer necessary now that we properly set the right
directory for the needed DLLs.
This reverts commit 3471c22f52
.
2024-10-29 00:46:54 +01:00
Benjamin Otte
dfb075699c
testsuite: Set $PATH for introspection tests
...
This is necessary because Windows uses $PATH to search for DLLs and
meson isn't smart enough to figure out that this test needs access
to the DLL.
2024-10-29 00:46:54 +01:00
Benjamin Otte
3ca5a75ab0
testsuite: depend on gir and libgtk in introspection test
...
We also don't need to LD_PRELOAD anymore if we do that.
2024-10-29 00:46:54 +01:00
Benjamin Otte
7d87118151
testsuite: Handle gdk_display_open() returning NULL
...
It turns out the Windows backend does that.
2024-10-29 00:46:54 +01:00
Matthias Clasen
a1d9b3e47d
Merge branch 'display-init' into 'main'
...
gdk: No displays before init
See merge request GNOME/gtk!7836
2024-10-21 22:53:50 +00:00
Matthias Clasen
84779ccdbc
tests: Cosmetics
...
Our test setups aready enforce GSETTINGS_BACKEND=memory, don't set
it again in code.
2024-10-21 13:30:19 -04:00
Matthias Clasen
acd00ceb4d
tests: Fix the displaymanager tests
...
Don't open a display without gtk_init().
2024-10-21 13:30:19 -04:00
Matthias Clasen
66367bf5d9
tests: Fix the textbuffer tests
...
Don't needlessly open a display before gtk_init.
2024-10-21 12:32:25 -04:00
Benjamin Otte
a68f1d6155
testsuite: Fix MSVC warnings
...
ints/longs have a different size to pointers on Windows 64bit.
And casts from int to pointer of diferent size cause a warning.
2024-10-21 07:35:42 +02:00
Benjamin Otte
591bc5edc0
build: Work around duplicated define of APIENTRY
...
epoxy defines it if windows.h hasn't been included.
So include windows.h before epoxy.
See also https://github.com/anholt/libepoxy/issues/299
2024-10-21 07:35:41 +02:00
Benjamin Otte
fdb4469234
testsuite: Don't use random numbers in test output
...
glibc prints the value as 0.096203, msvcrt prints 0.0962031.
And I don't think any spec defines which way things need to be rounded.
2024-10-20 23:53:04 +02:00
Benjamin Otte
01c754f93b
testsuite: Windows separators are different
...
On top of that we defined a preprocessor constant to 2 different
values, but instead of checking the value, we only checked if
it was defined. Now we only define it in one place.
2024-10-20 23:53:04 +02:00
Benjamin Otte
a891c90798
win32: Use right name for GIO_USE_VOLUME_MONITOR in CI
2024-10-20 23:53:04 +02:00
Benjamin Otte
5d01fe96c6
testsuite: Create timezone without guessing names
...
Guessing names is not portable, in particular not to Windows.
See also commit 4881ef2
.
2024-10-20 23:53:04 +02:00
Benjamin Otte
6ef3fc2dbb
testsuite: Hey, everyone has an NGL renderer, right?
...
No.
This fix is not that much better, but I'm too tired to fix stuff
like this properly.
And the Cairo renderer did at least work everywhere during 4.x
2024-10-20 23:53:04 +02:00
Benjamin Otte
3a7f242e08
testsuite: MIME types aren't CONTENT types
...
Somebody came up with the great idea of content types, which
are just like mime types, only that they aren't on Windows.
So if we want a working testsuite that actually works on Windows,
we cannot mix them up.
2024-10-20 23:53:04 +02:00
Benjamin Otte
5e9e8a6f5d
testsuite: Canonicalize filenames
...
It looks weird on Windows if half the paths use \ and the other
half use /
2024-10-19 20:22:03 +02:00
Matthias Clasen
06b8863bf7
Merge branch 'oklab-support' into 'main'
...
oklab and oklch support
See merge request GNOME/gtk!7801
2024-10-12 18:44:03 +00:00
Matthias Clasen
d754f5c1b4
Merge branch 'css-color-hookup-6' into 'main'
...
Make non-srgb css colors work for gradients
See merge request GNOME/gtk!7584
2024-10-12 18:29:31 +00:00
Guido Günther
c86e45c432
gtk4-builder-tool: Rewrite Gtk{H,V}Seperator
...
One less UI element to worry about when migrating from GTK3.
Signed-off-by: Guido Günther <agx@sigxcpu.org >
2024-10-05 15:54:49 +02:00
Matthias Clasen
2a1b8c4fcc
gdk: Add oklab and oklch color states
...
These are new default color states.
Tests for the tf and matrices included.
2024-10-04 20:37:09 -04:00
Matthias Clasen
ed9e759917
Add a test for gradient rendering
...
This tests that gradients get interpolated differently in
srgb and rec2100-linear.
2024-10-04 17:13:27 -04:00
Matthias Clasen
f69d7f804a
tests: Use the new gradient node apis
...
Properly replay gradient nodes with color state information.
2024-10-04 17:13:27 -04:00
Matthias Clasen
b43294c1c3
nodeparser: Handle color states for gradients
...
Test included.
2024-10-04 15:08:34 -04:00
Matthias Clasen
5d4f2822d0
Fix testsuite setup
...
We no longer say GDK_DEBUG=gl-prefer-gl, we say GDK_DISABLE=gles-api.
2024-10-03 20:11:00 -04:00
Benjamin Otte
6847c3469d
testsuite: Keep bounds for clip tests
...
The hope here is that it makes clip tests more reproducible because the
coordinates in device pixels are still the same as before.
2024-10-02 01:26:24 +02:00
Benjamin Otte
7a1e5b4418
compare-render: Add a KEEP_BOUNDS flag
...
If that flag is set, we keep the bounds of the original node when
rendering the modified node.
Gets around the replay test having to draw a transparent color node to
ensure the same bounds.
2024-10-02 01:26:24 +02:00
Matthias Clasen
5ce196fe9f
Rename memory texture tests from ngl to gl
2024-09-30 21:59:59 -04:00
Matthias Clasen
c31c89c794
Drop gl renderer tests from memory texture test
2024-09-30 21:55:33 -04:00
Matthias Clasen
1eb8c3ea34
tests: Add ngl-released in memory texture test
...
This is parallel to the gl-released method, but for ngl.
2024-09-30 21:52:16 -04:00
Matthias Clasen
55bb77cffc
tests: Use the ngl renderer in one more place
2024-09-30 19:22:54 -04:00
Matthias Clasen
119ba5844f
testsuite: Drop glshader tests
...
And drop the gl renderer test here, but add ngl and Vulkan
equivalents.
2024-09-30 19:22:54 -04:00
Matthias Clasen
d01ca53bde
testsuite: Don't assert more than guaranteed
...
Compositors don't guarantee that there's any physical devices
around to correspond to the input capabilities.
This was found running the tests against mutter headless.
2024-09-29 09:30:56 -04:00
Benjamin Otte
e18c553457
gpu: Consider scissor when intersecting with recangle
...
The clip might be different from the scissor due to incompatible
intersections.
But the resulting intersection might be fully clipped, so we should
consider it.
Testsuite with longer explanation attached.
Fixes #7044
2024-09-29 06:29:47 +02:00
Benjamin Otte
6c7abf425a
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Remove leftover test.in files
See merge request GNOME/gtk!7744
2024-09-26 18:47:49 +00:00
Benjamin Otte
2274bca95b
gl: Require support for GLsync
...
It's supported by GL >= 3.2 and GLES >= 3.0 and we require both now.
2024-09-26 18:41:13 +02:00
Benjamin Otte
58b44ebc1c
testsuite: Remove GLES 2 tests
...
We want to drop GLES 2 support.
2024-09-26 18:41:13 +02:00
Benjamin Otte
b598f21506
testsuite: Remove leftover test.in files
...
We stopped supporting installed tests in 3121f88265
but forgot to remove
these files.
2024-09-26 16:35:47 +00:00
Benjamin Otte
bd3223d452
testsuite: Add missing headers
2024-09-25 02:50:22 +02:00
Benjamin Otte
2a39f427e1
testsuite: include missing headers
2024-09-25 02:50:22 +02:00
Benjamin Otte
7fe22845e3
Merge branch 'wip/otte/fix-ci' into 'main'
...
testsuite: Use RGBA8 reference images
See merge request GNOME/gtk!7735
2024-09-24 17:52:55 +00:00
Benjamin Otte
feeca98270
testsuite: Use RGBA8 reference images
...
Due to a Mesa bug, RGBA16 images aren't properly handled sometimes and
can cause random failures.
In this case, generating the modified reference images for the tests
fails.
Fixes CI breakage.
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11750
2024-09-24 13:57:09 +00:00
taozuhong
7c27241479
Add gtk_string_list_find method
...
This is a convenience API to find a given string's position.
Test included.
2024-09-24 15:44:04 +02:00
Matthias Clasen
bbe74abf51
Fix tests for 4.17
2024-09-24 14:23:31 +02:00