From 84ad9d48d4007bd7812404aeebed5432e0374918 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 May 2024 10:31:52 +1000 Subject: [PATCH] meson.build: split the pytest invocations into separate ones In the meson test run, split the pytests across multiple invocations. This makes it slighly easier to debug and also avoids any timeout issues since we no longer have one long test run. --- meson.build | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index bf371312..ed40d70f 100644 --- a/meson.build +++ b/meson.build @@ -292,17 +292,25 @@ if get_option('tests').enabled() env.set('LD_LIBRARY_PATH', fs.parent(lib_libwacom.full_path())) pymod.find_installation(modules: ['libevdev', 'pyudev', 'pytest']) pytest = find_program('pytest-3', 'pytest') - test('pytest', - pytest, - args: ['--verbose', - '-rfES', - '--log-level=DEBUG', - '--log-file', meson.project_build_root() / 'meson-logs' / 'pytest.log', - '--log-file-level=DEBUG', - meson.current_source_dir() - ], - env: env, - suite: ['all']) + pytest_files = [ + 'test_data_files.py', + 'test_libwacom.py', + 'test_svg.py', + 'test_udev_rules.py', + ] + foreach f: pytest_files + test('pytest @0@'.format(f), + pytest, + args: ['--verbose', + '-rfES', + '--log-level=DEBUG', + '--log-file', meson.project_build_root() / 'meson-logs' / 'pytest.log', + '--log-file-level=DEBUG', + meson.current_source_dir() / 'test' / f, + ], + env: env, + suite: ['all']) + endforeach endif endif