build: Add thorough test setup

This allows the tests to be run with `meson test --setup thorough` and
it will run all the GTest tests with `-m thorough`.

Since this argument isn’t supported by the Python tests, it’s not passed
to them.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-01-18 16:54:45 +00:00
parent a4b9b41afc
commit eb19551ebe
2 changed files with 29 additions and 0 deletions

View File

@ -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 its the special xmllint test in GLib, then dont
# 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[@]}"

View File

@ -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]