glib/.gitlab-ci/thorough-test-wrapper.sh
Philip Withnall eb19551ebe 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>
2024-01-18 17:22:09 +00:00

22 lines
523 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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[@]}"