mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-13 03:05:12 +01:00
During "as-installed" testing, we should search the GIR_DIR for GIR XML, instead of hard-coding that it is `${prefix}/share/gir-1.0`. This is not the case on at least Debian, in order to make it possible to install more than one architecture's flavour of `GLib-2.0.gir`, which contains some architecture-specific `#define`s. Also search GOBJECT_INTROSPECTION_DATADIR/GIR_SUFFIX (in practice something like `/usr/share/gir-1.0` in all cases) to accommodate distributions like Debian that move the architecture-independent majority of GIR XML into /usr/share to avoid duplication, leaving only the architecture-specific minority of files like `GLib-2.0.gir` in the GIR_DIR. Signed-off-by: Simon McVittie <smcv@collabora.com>
24 lines
541 B
Bash
Executable File
24 lines
541 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright 2020 Frederic Martinsons
|
|
# Copyright 2020 Endless OS Foundation, LLC
|
|
# Copyright 2024 Collabora Ltd.
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
set -eu
|
|
|
|
if [ -z "${G_TEST_SRCDIR-}" ]; then
|
|
me="$(readlink -f "$0")"
|
|
G_TEST_SRCDIR="${me%/*}"
|
|
fi
|
|
|
|
export TEST_NAME=black
|
|
export TEST_REQUIRES_TOOLS="black git"
|
|
|
|
run_lint () {
|
|
# shellcheck disable=SC2046
|
|
black --diff --check $(git ls-files '*.py' 'tests/lib/*.py.in')
|
|
}
|
|
|
|
# shellcheck source=tests/lint-common.sh
|
|
. "$G_TEST_SRCDIR/lint-common.sh"
|