mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
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:
parent
a4b9b41afc
commit
eb19551ebe
22
.gitlab-ci/thorough-test-wrapper.sh
Normal file
22
.gitlab-ci/thorough-test-wrapper.sh
Normal 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 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[@]}"
|
@ -193,6 +193,13 @@ add_test_setup('unstable_tests',
|
|||||||
#suites: ['flaky', 'unstable']
|
#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
|
# Allow the tests to be easily run under valgrind using --setup=valgrind
|
||||||
valgrind = find_program('valgrind', required: false)
|
valgrind = find_program('valgrind', required: false)
|
||||||
valgrind_suppression_file = files('tools' / 'glib.supp')[0]
|
valgrind_suppression_file = files('tools' / 'glib.supp')[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user