meson: tests: built utils static libraries

With the old build system we just list the source files directly for
each test, but this would not work as expected with Meson.

For every binary there is a separate directory with its object files
which would mean all the utils sources would be compiled repeatedly
for every test using them.

Having static libraries ensures that the utils sources are compiled
only once.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina
2020-06-18 02:01:49 +02:00
parent 8885a3c135
commit 401aa32fdb
3 changed files with 55 additions and 10 deletions

View File

@@ -340,7 +340,7 @@ virTestRewrapFile(const char *filename)
script = g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_srcdir);
cmd = virCommandNewArgList(PYTHON, script, "--in-place", filename, NULL);
cmd = virCommandNewArgList(PYTHON3, script, "--in-place", filename, NULL);
if (virCommandRun(cmd, NULL) < 0)
return -1;