[PATCH RFC 07/10] meson: create meson custom target for python test dependencies

John Snow posted 10 patches 2 weeks, 2 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
[PATCH RFC 07/10] meson: create meson custom target for python test dependencies
Posted by John Snow 2 weeks, 2 days ago
RFC: I can't actually seem to make this depend on the group file as it
is stored in the pyvenv directory, so the output for this target doesn't
actually exist. Not ideal, but I want to send an RFC to the list before
spending too much time figuring this out.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/meson.build | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/meson.build b/tests/meson.build
index cbe79162411..e61efc21802 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,3 +1,18 @@
+pyvenv_test_deps = custom_target(
+    'pyvenv_test_deps',
+    output: 'tests.group',
+    input: files(
+        meson.source_root() + '/pythondeps.toml',
+        meson.source_root() + '/python/scripts/mkvenv.py'
+    ),
+
+    command: [ python, '@INPUT1@',
+               'ensuregroup',
+               '--dir', meson.source_root() + '/python/wheels',
+               '@INPUT0@',
+               'tests' ],
+)
+
 subdir('bench')
 subdir('qemu-iotests')
 
-- 
2.51.0