@samitouri / QOSamiQemu / commits / 36578add66

tests/functional: preserve PYTHONPATH entries

Otherwise, it's not possible to use a packaged qemu.qmp. Fixes: 1497377857 ("tests/functional: Prepare the meson build system for the functional tests") Signed-off-by: Alyssa Ross <hi@alyssa.is> Link: https://lore.kernel.org/r/20260323084739.1013748-1-hi@alyssa.is Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Alyssa Ross committed Mar 23, 2026 at 09:47 UTC 36578add66d83a2e00b2c7678404750b6f261ca3
1 file changed +8 -4
tests/functional/meson.build
+8 -4
@@ -76,8 +76,10 @@ foreach speed : ['quick', 'thorough']
76 endif
77 test_env.set('QEMU_TEST_QEMU_BINARY', test_emulator.full_path())
78 test_env.set('MESON_BUILD_ROOT', meson.project_build_root())
79 - test_env.set('PYTHONPATH', meson.project_source_root() / 'python:' +
80 - meson.current_source_dir())
79 + test_env.prepend('PYTHONPATH',
80 + meson.project_source_root() / 'python',
81 + meson.current_source_dir(),
82 + separator : ':')
83
84 # Define the GDB environment variable if gdb is available.
85 gdb = get_option('gdb')
@@ -97,8 +99,10 @@ foreach speed : ['quick', 'thorough']
99 test_precache_env = environment()
100 test_precache_env.set('QEMU_TEST_PRECACHE', meson.current_build_dir() / teststamp)
101 test_precache_env.set('MESON_BUILD_ROOT', meson.project_build_root())
100 - test_precache_env.set('PYTHONPATH', meson.project_source_root() / 'python:' +
101 - meson.current_source_dir())
102 + test_precache_env.prepend('PYTHONPATH',
103 + meson.project_source_root() / 'python',
104 + meson.current_source_dir(),
105 + separator : ':')
106 precache = custom_target('func-precache-' + testname,
107 output: teststamp,
108 command: [python, testpath],