summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-09-20 11:44:27 -0400
committerJohn Turner <jturner.usa@gmail.com>2025-09-20 11:44:27 -0400
commit439f5d9a33b19be4a7159c4518563d8e99fbba2a (patch)
treef6a16e6c71f3bd5e4fac8fc04fff95e80157c2ed
parent93270c7949ac2555ce8371382b6dcf7638b78487 (diff)
downloadpypaste-439f5d9a33b19be4a7159c4518563d8e99fbba2a.tar.gz
use foreach loop to create meson test targets
-rw-r--r--meson.build2
-rw-r--r--tests/meson.build7
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