aboutsummaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-04-03 09:00:38 -0400
committerDavid Robillard <d@drobilla.net>2023-04-06 07:19:10 -0400
commit40d98e4f4299e6da6455ff415d961de73db39e27 (patch)
tree90e5a6439db3d1d3e89f00097577851ce7f1ef26 /test/meson.build
parentab712f8f0ea58f1a36aced42332ed8d8ffab83d7 (diff)
downloadserd-40d98e4f4299e6da6455ff415d961de73db39e27.tar.gz
serd-40d98e4f4299e6da6455ff415d961de73db39e27.tar.bz2
serd-40d98e4f4299e6da6455ff415d961de73db39e27.zip
Add pylint test
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/meson.build b/test/meson.build
index 0104079f..a4de9090 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -8,8 +8,11 @@ wrapper = meson.get_external_property('exe_wrapper', '')
# Scripts and Metadata #
########################
-python_scripts = files(
+plot_scripts = files(
'../scripts/serd_bench.py',
+)
+
+simple_scripts = files(
'run_suite.py',
'serd_test_util/__init__.py',
'test_quiet.py',
@@ -17,6 +20,8 @@ python_scripts = files(
'test_write_error.py',
)
+python_scripts = simple_scripts + plot_scripts
+
if get_option('lint')
# Check release metadata
if not meson.is_subproject()
@@ -52,6 +57,25 @@ if get_option('lint')
if flake8.found()
test('flake8', flake8, args: python_scripts, suite: 'scripts')
endif
+
+ # Check scripts for errors with pylint
+ pylint = find_program('pylint', required: false)
+ if pylint.found()
+ pymod = import('python')
+ plot_py = pymod.find_installation(
+ 'python3',
+ modules: ['matplotlib'],
+ required: false,
+ )
+
+ pylint_scripts = simple_scripts
+ if plot_py.found()
+ pylint_scripts += plot_scripts
+ endif
+
+ pylint_args = ['--disable', 'bad-option-value']
+ test('pylint', pylint, args: pylint_args + pylint_scripts, suite: 'scripts')
+ endif
endif
###################