diff --git a/.gitlab-ci/thorough-test-wrapper.sh b/.gitlab-ci/thorough-test-wrapper.sh new file mode 100644 index 000000000..2bb149ed8 --- /dev/null +++ b/.gitlab-ci/thorough-test-wrapper.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2024 GNOME Foundation, Inc. +# +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# Original author: Philip Withnall + +set -e + +# If the test is run under Python (e.g. the first argument to this script is +# /usr/bin/python3) or if it’s the special xmllint test in GLib, then don’t +# pass the GTest `-m thorough` argument to it. +if [[ "$1" == *"python"* || + "$1" == *"xmllint" ]]; then + args=() +else + # See the documentation for g_test_init() + args=("-m" "thorough") +fi + +exec "$@" "${args[@]}" \ No newline at end of file diff --git a/meson.build b/meson.build index 909ddd26c..e82fdb4ee 100644 --- a/meson.build +++ b/meson.build @@ -193,6 +193,13 @@ add_test_setup('unstable_tests', #suites: ['flaky', 'unstable'] ) +add_test_setup('thorough', + exclude_suites: ['flaky', 'failing', 'performance'], + env: common_test_env, + timeout_multiplier: 20, + exe_wrapper: [find_program('./.gitlab-ci/thorough-test-wrapper.sh', required: true)], +) + # Allow the tests to be easily run under valgrind using --setup=valgrind valgrind = find_program('valgrind', required: false) valgrind_suppression_file = files('tools' / 'glib.supp')[0]