mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-01 13:49:39 +02: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:
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[@]}"
|
Reference in New Issue
Block a user