glib/tests/meson.build
Marco Trevisan (Treviño) 4bcd99de43 tests: Avoid reusing and installing multiple files the taptestrunner
Add some basic support for having glib-tests-only python libraries that
can be shared across the various projects, so that we don't have to
maintain multiple copies of them.
2025-02-11 18:51:15 +01:00

47 lines
1019 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',
)
# TAP test runner for Python tests
if installed_tests_enabled
install_data(
files(fs.relative_to(
meson.project_source_root() / python_test_libraries_path,
meson.current_source_dir()) / 'taptestrunner.py'),
install_dir: installed_tests_execdir,
install_tag: 'tests',
)
endif