Compare commits

...

11 Commits

Author SHA1 Message Date
Benjamin Otte
eca902ed35 Revert "Fix the icon-effect-missing reftest"
This reverts commit 4f81dc1eaf.

This change is no longer necessary after the last commit.
2024-11-08 16:44:22 +01:00
Benjamin Otte
c6173947af icontheme: Load the missing image icon from the theme
... instead of hardcoding the included resource unconditionally.

Fixes icon-effect-missing.ui reftest on Windows.
2024-11-08 16:44:22 +01:00
Benjamin Otte
2ced7d082d ngl: Clear the GL context after chaining up
Chaining up makes the GL context current, so doing it before is
basically a no-op.
2024-11-08 16:44:22 +01:00
Benjamin Otte
31e1e60ccd CI: Build our own Pango instead of using msys
1. Msys builds it for fontconfig, we want DirectWrite

2. The testsuite needs fixes that only exist in master

3. We don't want to bump the required Pango version just for that

We should revert this when those fixes have landed upstream.
2024-11-08 16:44:22 +01:00
Benjamin Otte
ba2f09457f CI: Turn off gdb wrapper again
Also unset maxfail again.
2024-11-08 16:44:22 +01:00
Benjamin Otte
b2c8f936ba CI: Limit number of parallel tests for msys runs
This is the result of some consecutive runs with different values.
More would make the runtime of individual tests grow and we don't
want that.
2024-11-08 16:44:22 +01:00
Benjamin Otte
38d613478f CI: Catch test crashes with gdb wrapper
Add a gdb script to catch segfaults and launch it using meson --wrapper

And try really hard to make that script safe for Windows/msys, because
we want to use it there.
2024-11-08 16:44:22 +01:00
Benjamin Otte
070c397ed5 CI: Set MESON_TEST_MAX_FAIL for msys build 2024-11-08 16:44:22 +01:00
Benjamin Otte
b3c1a753f1 CI: Add a meson test run for mingw
So far, we disable all GL and Vulkan testing, because neither of them
works in CI.
2024-11-08 16:44:22 +01:00
Benjamin Otte
88ffbb93b9 CI: Add MESON_TEST_MAX_FAIL variable
Sets the value to be used for meson test --maxfail. This is useful when
bringing up a new testrunner or generally when debugging some changes
that cause many test failures.

If not set, we set it to 0, meaning disabled.
2024-11-08 16:44:22 +01:00
Benjamin Otte
335bfd7669 CI: Split Fedora runs from test runs
That way, we can inherit from either separately.
2024-11-08 16:44:22 +01:00
9 changed files with 85 additions and 55 deletions

View File

@@ -59,8 +59,7 @@ style-check-diff:
script:
- .gitlab-ci/run-style-check-diff.sh
.build-fedora-default:
image: $FEDORA_IMAGE
.test-runner:
artifacts:
name: "gtk-${CI_COMMIT_REF_NAME}"
when: always
@@ -69,6 +68,7 @@ style-check-diff:
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog-x11.junit.xml"
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog-wayland.junit.xml"
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog-wayland_gl.junit.xml"
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog-win32.junit.xml"
- "${CI_PROJECT_DIR}/_build/meson-logs/testlog-broadway.junit.xml"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
@@ -80,13 +80,20 @@ style-check-diff:
- "${CI_PROJECT_DIR}/_build/testsuite/css/output/*/*.syscap"
- "${CI_PROJECT_DIR}/_build/testsuite/headless/*/*.log"
- "${CI_PROJECT_DIR}/_build_hello/meson-logs"
# somewhat hacky to add this here, but avoids yaml madness
- "${CI_PROJECT_DIR}/_build/gtkdll.tar.gz"
.build-fedora-default:
image: $FEDORA_IMAGE
cache:
key: "$CI_JOB_NAME"
paths:
- _ccache/
fedora-x86_64:
extends: .build-fedora-default
extends:
- .test-runner
- .build-fedora-default
stage: build
needs: []
variables:
@@ -108,7 +115,9 @@ fedora-x86_64:
- .gitlab-ci/run-tests.sh _build wayland_gl gtk:gdk,gtk:gsk-gl
release-build:
extends: .build-fedora-default
extends:
- .test-runner
- .build-fedora-default
stage: build
needs: []
variables:
@@ -186,6 +195,7 @@ fedora-mingw64:
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/run-tests.sh _build win32 gtk"
cache:
key: "$CI_JOB_NAME"
paths:
@@ -197,17 +207,15 @@ fedora-mingw64:
- subprojects/pango/
msys2-ucrt64:
extends: .mingw-defaults
extends:
- .test-runner
- .mingw-defaults
needs: []
variables:
MSYSTEM: "UCRT64"
CHERE_INVOKING: "yes"
artifacts:
when: always
expose_as: 'Windows_DLL_MSYS2_64_bit_toolchain'
paths:
- "${CI_PROJECT_DIR}/_build/gtkdll.tar.gz"
MESON_TEST_MAX_PROCESSES: 2
macos:
rules:
# Do not run in forks as the runner is not available there.
@@ -390,7 +398,9 @@ static-scan:
# Run tests with the address sanitizer. We need to turn off introspection
# and f16c, since they are incompatible with asan
asan-build:
extends: .build-fedora-default
extends:
- .test-runner
- .build-fedora-default
tags: [ asan ]
stage: analysis
needs: []

View File

@@ -0,0 +1,28 @@
set charset UTF-8
set logging redirect on
set logging debugredirect on
set logging enabled on
set schedule-multiple on
set detach-on-fork off
catch signal
commands
set logging enabled off
py print ("# " + gdb.execute ("thread apply all bt full", True, True).replace ("\n", "\n# "))
set logging enabled on
c
end
catch signal SIGTRAP
commands
set logging enabled off
py print ("# " + gdb.execute ("thread apply all bt full", True, True).replace ("\n", "\n# "))
set logging enabled on
q 1
end
r
if $_isvoid($_exitcode)
q $_exitsignal
else
q $_exitcode

View File

@@ -9,6 +9,7 @@ setup=$2
suite=$3
multiplier=${MESON_TEST_TIMEOUT_MULTIPLIER:-1}
n_processes=${MESON_TEST_MAX_PROCESSES:-1}
max_fail=${MESON_TEST_MAX_FAIL:-0}
# Ignore memory leaks lower in dependencies
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:detect_leaks=0:allocator_may_return_null=1:symbolize=1
@@ -23,6 +24,7 @@ case "${setup}" in
--quiet \
--timeout-multiplier "${multiplier}" \
--num-processes "${n_processes}" \
--maxfail "${max_fail}" \
--print-errorlogs \
--setup=${setup} \
--suite=${suite//,/ --suite=} \
@@ -49,6 +51,7 @@ case "${setup}" in
--quiet \
--timeout-multiplier "${multiplier}" \
--num-processes "${n_processes}" \
--maxfail "${max_fail}" \
--print-errorlogs \
--setup=${setup} \
--suite=${suite//,/ --suite=} \
@@ -74,6 +77,7 @@ case "${setup}" in
--quiet \
--timeout-multiplier "${multiplier}" \
--num-processes "${n_processes}" \
--maxfail "${max_fail}" \
--print-errorlogs \
--setup=${setup} \
--suite=${suite//,/ --suite=} \
@@ -86,6 +90,26 @@ case "${setup}" in
kill ${server}
;;
win32*)
meson test -C ${builddir} \
--quiet \
--timeout-multiplier "${multiplier}" \
--num-processes "${n_processes}" \
--maxfail "${max_fail}" \
--print-errorlogs \
--setup=${setup} \
--suite=${suite//,/ --suite=} \
--no-suite=failing \
--no-suite=${setup}_failing \
--no-suite=flaky \
--no-suite=headless \
--no-suite=gsk-compare-gl \
--no-suite=gsk-compare-ngl \
--no-suite=gsk-compare-vulkan \
--no-suite=gsk-compare-broadway
exit_code=$?
;;
*)
echo "Failed to add ${setup} to .gitlab-ci/run-tests.sh"
exit 1

View File

@@ -17,12 +17,12 @@ pacman --noconfirm -S --needed \
${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme \
${MINGW_PACKAGE_PREFIX}-atk \
${MINGW_PACKAGE_PREFIX}-cairo \
${MINGW_PACKAGE_PREFIX}-gdb \
${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2 \
${MINGW_PACKAGE_PREFIX}-glib2 \
${MINGW_PACKAGE_PREFIX}-graphene \
${MINGW_PACKAGE_PREFIX}-json-glib \
${MINGW_PACKAGE_PREFIX}-libepoxy \
${MINGW_PACKAGE_PREFIX}-pango \
${MINGW_PACKAGE_PREFIX}-fribidi \
${MINGW_PACKAGE_PREFIX}-gst-plugins-bad-libs \
${MINGW_PACKAGE_PREFIX}-shared-mime-info \
@@ -40,6 +40,7 @@ ccache --zero-stats
ccache --show-stats
export CCACHE_DISABLE=true
meson setup \
--force-fallback-for pango \
-Dx11-backend=false \
-Dwayland-backend=false \
-Dwin32-backend=true \

View File

@@ -154,9 +154,9 @@ gsk_ngl_renderer_unrealize (GskRenderer *renderer)
gsk_ngl_renderer_free_backbuffer (self);
gdk_gl_context_clear_current ();
GSK_RENDERER_CLASS (gsk_ngl_renderer_parent_class)->unrealize (renderer);
gdk_gl_context_clear_current ();
}
static void

View File

@@ -2267,9 +2267,13 @@ real_choose_icon (GtkIconTheme *self,
gdk_debug_message ("No icon found in %s (or fallbacks) for: %s", self->current_theme, s);
g_free (s);
}
icon = icon_paintable_new ("image-missing", size, scale);
icon->filename = g_strdup (IMAGE_MISSING_RESOURCE_PATH);
icon->is_resource = TRUE;
return real_choose_icon (self,
(const char*[2]) { "image-missing", NULL },
size,
scale,
flags,
non_blocking);
}
out:

View File

@@ -2,7 +2,6 @@
<interface>
<object class="GtkWindow" id="window1">
<property name="decorated">0</property>
<signal name="map" handler="reftest:set_icon_theme_hicolor" swapped="no"/>
<child>
<object class="GtkBox" id="box1">
<child>

View File

@@ -1,35 +0,0 @@
/*
* Copyright (C) 2021 Red Hat, Inc
*
* Author:
* Matthias Clasen <mclasen@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gtk/gtk.h>
G_MODULE_EXPORT void
set_icon_theme_hicolor (void)
{
GtkSettings *settings;
g_test_message ("Attention: setting icon-theme to hicolor");
settings = gtk_settings_get_for_display (gdk_display_get_default ());
g_object_set (settings, "gtk-icon-theme-name", "hicolor", NULL);
}

View File

@@ -25,7 +25,6 @@ libreftest = library('reftest',
'textview-border-windows.c',
'textview-tags.c',
'animation-direction.c',
'icon-theme-hicolor.c',
],
link_with: libgtkreftestprivate,
c_args: reftest_cflags,