mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
ca77a1625d
When we invoke a shell script directly, the system selects a bash binary
that might be different from the one detected by find_program('bash').
Explicitly use the one detected by Meson, matching the behavior of our
other test() invocations on shell scripts.
Fixes test failure on Windows in GitHub Actions CI:
stdout: 1: UNKNOWN: Windows Subsystem for Linux has no installed distributions.
stdout: 2: UNKNOWN: Distributions can be installed by visiting the Microsoft Store:
stdout: 3: UNKNOWN: https://aka.ms/wslstore
Found-by: Benoit Pierre <benoit.pierre@gmail.com>
Fixes: d7601f7eed
("Incorporate some lint checks into `meson test`")
36 lines
715 B
Meson
36 lines
715 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,
|
|
bash,
|
|
args : [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',
|
|
)
|