Merge branch 'ci-gtk3-update' into 'gtk-3-24'
Update the CI pipeline for GTK3 See merge request GNOME/gtk!1508
This commit is contained in:
commit
8b5c8a2d06
@ -1,29 +1,33 @@
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v3
|
||||
|
||||
stages:
|
||||
- build
|
||||
- docs
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- _ccache/
|
||||
|
||||
fedora-autotools:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
|
||||
fedora-distcheck:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
variables:
|
||||
DO_DISTCHECK: "yes"
|
||||
when: manual
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
|
||||
fedora-meson: &fedora-meson-defaults
|
||||
fedora-meson:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
@ -31,10 +35,34 @@ fedora-meson: &fedora-meson-defaults
|
||||
- "_build/meson-logs"
|
||||
- "_build/testsuite/reftests/output"
|
||||
|
||||
fedora-meson-staticlibs:
|
||||
debian-meson:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/debian-gtk3:v1
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
|
||||
<<: *fedora-meson-defaults
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
- "_build/testsuite/reftests/output"
|
||||
|
||||
reference:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
|
||||
stage: docs
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release -Dgtk_doc=true -Dman=true"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
- ninja -C _build gdk3-doc gtk3-doc
|
||||
- tar -c -J -f gdk3-docs.tar.xz _build/docs/reference/gdk
|
||||
- tar -c -J -f gtk3-docs.tar.xz _build/docs/reference/gtk
|
||||
artifacts:
|
||||
paths:
|
||||
- gdk3-docs.tar.xz
|
||||
- gtk3-docs.tar.xz
|
||||
|
||||
msys2-mingw32-meson:
|
||||
variables:
|
||||
|
71
.gitlab-ci/debian-gtk3.Dockerfile
Normal file
71
.gitlab-ci/debian-gtk3.Dockerfile
Normal file
@ -0,0 +1,71 @@
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
adwaita-icon-theme \
|
||||
ccache \
|
||||
dconf-gsettings-backend \
|
||||
g++ \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
gobject-introspection \
|
||||
gvfs \
|
||||
hicolor-icon-theme \
|
||||
itstool \
|
||||
libatk-bridge2.0-dev \
|
||||
libatk1.0-dev \
|
||||
libc6-dev \
|
||||
libcairo2-dev \
|
||||
libcairo-gobject2 \
|
||||
libcolord-dev \
|
||||
libcups2-dev \
|
||||
libegl1-mesa-dev \
|
||||
libepoxy-dev \
|
||||
libfontconfig1-dev \
|
||||
libfreetype6-dev \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglib2.0-dev \
|
||||
libharfbuzz-dev \
|
||||
libjson-glib-dev \
|
||||
libpango1.0-dev \
|
||||
librest-dev \
|
||||
librsvg2-common \
|
||||
libsoup2.4-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcomposite-dev \
|
||||
libxcursor-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxfixes-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon-x11-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
locales \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
shared-mime-info \
|
||||
wayland-protocols \
|
||||
xauth \
|
||||
xvfb \
|
||||
&& rm -rf /usr/share/doc/* /usr/share/man/*
|
||||
|
||||
# Locale for our build
|
||||
RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
@ -1,19 +1,135 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script builds an image from the Dockerfile, starts a container with
|
||||
# the parent directory mounted as working directory and start a bash session
|
||||
# there so you can test things.
|
||||
# Once you are happy you can push it to the docker hub:
|
||||
# sudo docker push "${TAG}"
|
||||
|
||||
read_arg() {
|
||||
# $1 = arg name
|
||||
# $2 = arg value
|
||||
# $3 = arg parameter
|
||||
local rematch='^[^=]*=(.*)$'
|
||||
if [[ $2 =~ $rematch ]]; then
|
||||
read "$1" <<< "${BASH_REMATCH[1]}"
|
||||
else
|
||||
read "$1" <<< "$3"
|
||||
# There is no way to shift our callers args, so
|
||||
# return 1 to indicate they should do it instead.
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2"
|
||||
build=0
|
||||
run=0
|
||||
push=0
|
||||
list=0
|
||||
print_help=0
|
||||
no_login=0
|
||||
|
||||
# HOST_USER_ID gets used to create a user with the same ID so that files
|
||||
# created in the mounted volume have the same owner
|
||||
sudo docker build \
|
||||
--build-arg HOST_USER_ID="$UID" --tag "${TAG}" --file "Dockerfile" .
|
||||
sudo docker run --security-opt label=disable \
|
||||
--rm --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
||||
--tty --interactive "${TAG}" bash
|
||||
while (($# > 0)); do
|
||||
case "${1%%=*}" in
|
||||
build) build=1;;
|
||||
run) run=1;;
|
||||
push) push=1;;
|
||||
list) list=1;;
|
||||
help) print_help=1;;
|
||||
--base|-b) read_arg base "$@" || shift;;
|
||||
--base-version) read_arg base_version "$@" || shift;;
|
||||
--no-login) no_login=1;;
|
||||
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $print_help == 1 ]; then
|
||||
echo "$0 - Build and run Docker images"
|
||||
echo ""
|
||||
echo "Usage: $0 <command> [options] [basename]"
|
||||
echo ""
|
||||
echo "Available commands"
|
||||
echo ""
|
||||
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
|
||||
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
|
||||
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
|
||||
echo " list - List available images"
|
||||
echo " help - This help message"
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ $list == 1 ]; then
|
||||
echo "Available Docker images:"
|
||||
for f in *.Dockerfile; do
|
||||
filename=$( basename -- "$f" )
|
||||
basename="${filename%.*}"
|
||||
|
||||
echo -e " \e[1;39m$basename\e[0m"
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# All commands after this require --base to be set
|
||||
if [ -z $base ]; then
|
||||
echo "Usage: $0 <command>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$base.Dockerfile" ]; then
|
||||
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $base_version ]; then
|
||||
base_version="latest"
|
||||
else
|
||||
base_version="v$base_version"
|
||||
fi
|
||||
|
||||
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
|
||||
# Docker is actually implemented by podman, and its OCI output
|
||||
# is incompatible with some of the dockerd instances on GitLab
|
||||
# CI runners.
|
||||
echo "Using: Podman"
|
||||
format="--format docker"
|
||||
CMD="podman"
|
||||
else
|
||||
echo "Using: Docker"
|
||||
format=""
|
||||
CMD="sudo socker"
|
||||
fi
|
||||
|
||||
REGISTRY="registry.gitlab.gnome.org"
|
||||
TAG="${REGISTRY}/gnome/gtk/${base}:${base_version}"
|
||||
|
||||
if [ $build == 1 ]; then
|
||||
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} build \
|
||||
${format} \
|
||||
--build-arg HOST_USER_ID="$UID" \
|
||||
--tag "${TAG}" \
|
||||
--file "${base}.Dockerfile" .
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $push == 1 ]; then
|
||||
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
|
||||
|
||||
if [ $no_login == 0 ]; then
|
||||
${CMD} login ${REGISTRY}
|
||||
fi
|
||||
|
||||
${CMD} push ${TAG}
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $run == 1 ]; then
|
||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} run \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--workdir "/home/user/app" \
|
||||
--tty \
|
||||
--interactive "${TAG}" \
|
||||
bash
|
||||
exit $?
|
||||
fi
|
||||
|
@ -5,19 +5,31 @@ set -e
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
export N_PROCS=$(($(nproc) - 1))
|
||||
|
||||
EXTRA_CONFIGURE_OPT=""
|
||||
|
||||
# Only enable documentation when distchecking, since it's required
|
||||
if [ -n "${DO_DISTCHECK-}" ]; then
|
||||
EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-gtk-doc"
|
||||
fi
|
||||
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
mkdir _build
|
||||
cd _build
|
||||
../autogen.sh \
|
||||
|
||||
../configure \
|
||||
--enable-cloudproviders \
|
||||
--enable-broadway-backend \
|
||||
--enable-wayland-backend \
|
||||
--enable-x11-backend \
|
||||
--enable-xinerama \
|
||||
--enable-gtk-doc
|
||||
make -j8
|
||||
${EXTRA_CONFIGURE_OPTS}
|
||||
|
||||
make -j${N_PROCS}
|
||||
|
||||
if [ -n "${DO_DISTCHECK-}" ]; then
|
||||
make -j8 check SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
make -j8 distcheck SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
make -j${N_PROCS} check SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
make -j${N_PROCS} distcheck SKIP_GDKTARGET="echo Not actually running tests for now"
|
||||
fi
|
||||
|
@ -10,10 +10,10 @@ export PATH="${HOME}/.local/bin:${PATH}"
|
||||
python3 -m pip install --user meson==0.49.2
|
||||
|
||||
meson \
|
||||
-Dgtk_doc=true \
|
||||
-Dman=true \
|
||||
-Dinstalled_tests=true \
|
||||
-Dbroadway_backend=true \
|
||||
-Dx11_backend=true \
|
||||
-Dwayland_backend=true \
|
||||
-Dxinerama=yes \
|
||||
-Dprint_backends="file,lpr,test,cloudprint,cups" \
|
||||
${EXTRA_MESON_FLAGS:-} \
|
||||
@ -28,5 +28,3 @@ xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
--print-errorlogs \
|
||||
--suite=gtk+-3.0 \
|
||||
--no-suite=gtk+-3.0:a11y
|
||||
|
||||
ninja gail-libgail-util3-doc gdk3-doc gtk3-doc
|
||||
|
@ -104,14 +104,6 @@
|
||||
* Use this macro to guard code that is specific to the Wayland backend.
|
||||
*/
|
||||
|
||||
/**
|
||||
* GDK_DISABLE_DEPRECATION_WARNINGS:
|
||||
*
|
||||
* A macro that should be defined before including the gdk.h header.
|
||||
* If it is defined, no compiler warnings will be produced for uses
|
||||
* of deprecated GDK APIs.
|
||||
*/
|
||||
|
||||
typedef struct _GdkPredicate GdkPredicate;
|
||||
|
||||
struct _GdkPredicate
|
||||
|
@ -3671,8 +3671,10 @@ tablet_tool_handle_proximity_out (void *data,
|
||||
{
|
||||
GdkWaylandTabletToolData *tool = data;
|
||||
GdkWaylandTabletData *tablet = tool->current_tablet;
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat);
|
||||
GdkEvent *event;
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tool->seat);
|
||||
#endif
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_message ("proximity out, seat %p, tool %d", seat,
|
||||
|
@ -1539,10 +1539,12 @@ xdg_output_handle_description (void *data,
|
||||
struct zxdg_output_v1 *xdg_output,
|
||||
const char *description)
|
||||
{
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *) data;
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_message ("handle description xdg-output %d", monitor->id));
|
||||
#endif
|
||||
}
|
||||
|
||||
static const struct zxdg_output_v1_listener xdg_output_listener = {
|
||||
|
@ -769,7 +769,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
else
|
||||
g_object_set_property (obj, param->name, ¶m->value);
|
||||
|
||||
#if G_ENABLE_DEBUG
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (GTK_DEBUG_CHECK (BUILDER))
|
||||
{
|
||||
gchar *str = g_strdup_value_contents ((const GValue*)¶m->value);
|
||||
@ -838,7 +838,7 @@ _gtk_builder_apply_properties (GtkBuilder *builder,
|
||||
else
|
||||
g_object_set_property (info->object, param->name, ¶m->value);
|
||||
|
||||
#if G_ENABLE_DEBUG
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (GTK_DEBUG_CHECK (BUILDER))
|
||||
{
|
||||
gchar *str = g_strdup_value_contents ((const GValue*)¶m->value);
|
||||
|
@ -541,7 +541,7 @@ gtk_css_gadget_margin_box_contains_point (GtkCssGadget *gadget,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
GtkAllocation margin_box;
|
||||
GtkAllocation margin_box = { 0, };
|
||||
gtk_css_gadget_get_margin_box (gadget, &margin_box);
|
||||
return allocation_contains_point (&margin_box, x, y);
|
||||
}
|
||||
@ -895,7 +895,7 @@ gtk_css_gadget_draw (GtkCssGadget *gadget,
|
||||
width - margin.left - margin.right,
|
||||
height - margin.top - margin.bottom);
|
||||
|
||||
#if G_ENABLE_DEBUG
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
GdkDisplay *display = gtk_widget_get_display (gtk_css_gadget_get_owner (gadget));
|
||||
GtkDebugFlag flags = gtk_get_display_debug_flags (display);
|
||||
|
@ -184,8 +184,6 @@ static void gtk_tree_store_buildable_custom_finished (GtkBuildable *builda
|
||||
const gchar *tagname,
|
||||
gpointer user_data);
|
||||
|
||||
static void validate_gnode (GNode *node);
|
||||
|
||||
static void gtk_tree_store_move (GtkTreeStore *tree_store,
|
||||
GtkTreeIter *iter,
|
||||
GtkTreeIter *position,
|
||||
@ -193,6 +191,8 @@ static void gtk_tree_store_move (GtkTreeStore *
|
||||
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static void validate_gnode (GNode *node);
|
||||
|
||||
static inline void
|
||||
validate_tree (GtkTreeStore *tree_store)
|
||||
{
|
||||
@ -3313,6 +3313,7 @@ gtk_tree_store_has_default_sort_func (GtkTreeSortable *sortable)
|
||||
return (tree_store->priv->default_sort_func != NULL);
|
||||
}
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static void
|
||||
validate_gnode (GNode* node)
|
||||
{
|
||||
@ -3328,6 +3329,7 @@ validate_gnode (GNode* node)
|
||||
iter = iter->next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* GtkBuildable custom tag implementation
|
||||
*
|
||||
|
@ -343,6 +343,8 @@ translate_purpose (GtkInputPurpose purpose)
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD;
|
||||
case GTK_INPUT_PURPOSE_PIN:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_PIN;
|
||||
case GTK_INPUT_PURPOSE_TERMINAL:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
}
|
||||
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
|
@ -220,15 +220,20 @@ gtk_cloudprint_account_search_rest_call_cb (RestProxyCall *call,
|
||||
gpointer user_data)
|
||||
{
|
||||
GTask *task = user_data;
|
||||
GtkCloudprintAccount *account = g_task_get_task_data (task);
|
||||
JsonParser *json_parser = NULL;
|
||||
JsonObject *result;
|
||||
JsonNode *printers = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("Cloud Print Backend: (%p) 'search' REST call "
|
||||
"returned\n", account));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
GtkCloudprintAccount *account = g_task_get_task_data (task);
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("Cloud Print Backend: (%p) 'search' REST call returned\n",
|
||||
account));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cb_error != NULL)
|
||||
{
|
||||
@ -445,14 +450,19 @@ gtk_cloudprint_account_printer_rest_call_cb (RestProxyCall *call,
|
||||
gpointer user_data)
|
||||
{
|
||||
GTask *task = user_data;
|
||||
GtkCloudprintAccount *account = g_task_get_task_data (task);
|
||||
JsonParser *json_parser = NULL;
|
||||
JsonObject *result;
|
||||
GError *error = NULL;
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("Cloud Print Backend: (%p) 'printer' REST call "
|
||||
"returned\n", account));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
GtkCloudprintAccount *account = g_task_get_task_data (task);
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("Cloud Print Backend: (%p) 'printer' REST call returned\n",
|
||||
account));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cb_error != NULL)
|
||||
{
|
||||
@ -536,14 +546,19 @@ gtk_cloudprint_account_submit_rest_call_cb (RestProxyCall *call,
|
||||
gpointer user_data)
|
||||
{
|
||||
GTask *task = user_data;
|
||||
GtkCloudprintAccount *account = g_task_get_task_data (task);
|
||||
JsonParser *json_parser = NULL;
|
||||
JsonObject *result;
|
||||
GError *error = NULL;
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("Cloud Print Backend: (%p) 'submit' REST call "
|
||||
"returned\n", account));
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
{
|
||||
GtkCloudprintAccount *account = g_task_get_task_data (task);
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("Cloud Print Backend: (%p) 'submit' REST call returned\n",
|
||||
account));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cb_error != NULL)
|
||||
{
|
||||
|
@ -166,6 +166,11 @@ assert_lookup_order (const char *icon_name,
|
||||
GtkIconInfo *info;
|
||||
GList *l;
|
||||
|
||||
/* this hack is only usable in debug builds */
|
||||
#ifndef G_ENABLE_DEBUG
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
|
||||
debug_flags = gtk_get_debug_flags ();
|
||||
gtk_set_debug_flags (debug_flags | GTK_DEBUG_ICONTHEME);
|
||||
g_log_set_writer_func (log_writer, NULL, NULL);
|
||||
@ -196,6 +201,15 @@ assert_lookup_order (const char *icon_name,
|
||||
gtk_set_debug_flags (debug_flags);
|
||||
}
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
#define require_debug()
|
||||
#else
|
||||
#define require_debug() \
|
||||
g_test_skip ("requires G_ENABLE_DEBUG"); \
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
test_basics (void)
|
||||
{
|
||||
@ -206,6 +220,8 @@ test_basics (void)
|
||||
static void
|
||||
test_lookup_order (void)
|
||||
{
|
||||
require_debug ();
|
||||
|
||||
assert_lookup_order ("foo-bar-baz", 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
"foo-bar-baz",
|
||||
"foo-bar",
|
||||
|
@ -50,6 +50,12 @@ tests = [
|
||||
['revealer-size'],
|
||||
]
|
||||
|
||||
# Tests that are expected to fail
|
||||
xfail = [
|
||||
]
|
||||
|
||||
is_debug = get_option('buildtype').startswith('debug')
|
||||
|
||||
test_cargs = []
|
||||
|
||||
if os_unix
|
||||
@ -77,6 +83,8 @@ foreach t : tests
|
||||
install: get_option('installed_tests'),
|
||||
install_dir: installed_test_bindir)
|
||||
|
||||
expect_fail = xfail.contains(test_name)
|
||||
|
||||
test(test_name, test_exe,
|
||||
args: [ '--tap', '-k' ],
|
||||
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
|
||||
@ -89,7 +97,9 @@ foreach t : tests
|
||||
'GSETTINGS_SCHEMA_DIR=@0@'.format(gtk_schema_build_dir),
|
||||
'GTK_TEST_MESON=1',
|
||||
],
|
||||
suite: 'gtk')
|
||||
suite: 'gtk',
|
||||
should_fail: expect_fail,
|
||||
)
|
||||
endforeach
|
||||
|
||||
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
|
||||
|
Loading…
Reference in New Issue
Block a user