From 439f5d9a33b19be4a7159c4518563d8e99fbba2a Mon Sep 17 00:00:00 2001 From: John Turner Date: Sat, 20 Sep 2025 11:44:27 -0400 Subject: use foreach loop to create meson test targets --- meson.build | 2 ++ tests/meson.build | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c752009..d5c234c 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,7 @@ project('pypaste') +fs = import('fs') + sources = files('pypaste/__init__.py') modules = [] diff --git a/tests/meson.build b/tests/meson.build index 6787668..e39a559 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,3 +1,6 @@ -test_server = find_program('test_server.py') +tests = files('test_server.py') -test('test_server', test_server) +foreach test : tests + name = fs.stem(test) + test(name, python, args: [test]) +endforeach -- cgit v1.2.3