aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2023-11-15 10:34:47 +0100
committerFlorian Schmaus <flow@gentoo.org>2023-11-16 16:52:54 +0100
commit54c5c9ebbf701f9dcd9f78da9f13ae967f922243 (patch)
treea7a3c43a8302ed18eccc909fcbd3de7093723be5 /tests
parentupdate deprecated test methods for python-3.12 compatibility (diff)
downloadjava-config-54c5c9ebbf701f9dcd9f78da9f13ae967f922243.tar.gz
java-config-54c5c9ebbf701f9dcd9f78da9f13ae967f922243.tar.bz2
java-config-54c5c9ebbf701f9dcd9f78da9f13ae967f922243.zip
Use Meson as build system
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build24
-rw-r--r--tests/testsuite/__init__.py9
2 files changed, 24 insertions, 9 deletions
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..9192707
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,24 @@
+py_test_env = environment()
+tests_python_paths = [
+ meson.project_source_root(),
+ meson.project_source_root() / 'src',
+]
+py_test_env.append('PYTHONPATH', tests_python_paths)
+
+py_tests = [
+ 'EnvironmentManager',
+ 'Package',
+ 'VM',
+ 'VersionManager',
+ 'VersionManagerEnv2',
+ 'Virtual',
+]
+
+foreach py_test : py_tests
+ test(
+ 'python-unittest-' + py_test,
+ py,
+ args: ['-m', 'unittest', 'tests.testsuite.' + py_test],
+ env: py_test_env,
+ )
+endforeach
diff --git a/tests/testsuite/__init__.py b/tests/testsuite/__init__.py
index bd9e014..e69de29 100644
--- a/tests/testsuite/__init__.py
+++ b/tests/testsuite/__init__.py
@@ -1,9 +0,0 @@
-__all__ = [ 'VM', 'Virtual', 'Package', 'VersionManager', 'VersionManagerEnv2', 'EnvironmentManager' ]
-from . import VM
-from . import Virtual
-from . import Package
-from . import VersionManager
-from . import VersionManagerEnv2
-from . import EnvironmentManager
-
-# vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: