glib/tests/meson.build
Simon McVittie 6da055b5ab tests: Provide G_TEST_SRCDIR, G_TEST_BUILDDIR to lint scripts
These scripts use $(readlink -f) to guess their own path if necessary,
but macOS readlink doesn't support the -f option, and POSIX doesn't
guarantee that readlink even exists.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/3289
Fixes: d7601f7e "Incorporate some lint checks into `meson test`"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-15 15:15:21 +00:00

34 lines
688 B
Meson

# Copyright 2024 Collabora Ltd.
# SPDX-License-Identifier: LGPL-2.1-or-later
test_env = environment()
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
lint_scripts = [
'black.sh',
'flake8.sh',
'reuse.sh',
'shellcheck.sh',
]
if have_bash
foreach test_name : lint_scripts
test(
test_name, files(test_name),
env : test_env,
suite : ['lint', 'no-valgrind'],
protocol : 'tap',
)
endforeach
endif
test(
'check-missing-install-tag.py',
python,
args : ['-B', files('check-missing-install-tag.py')],
env : test_env,
suite : ['lint', 'no-valgrind'],
protocol : 'tap',
)