]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/tracetool: Honor the Python interpreter that "configure" detected
authorThomas Huth <thuth@redhat.com>
Thu, 15 Jan 2026 15:53:18 +0000 (16:53 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 27 Jan 2026 14:20:43 +0000 (15:20 +0100)
The tracetool tests currently fail if the host installation does not
have a "python3" binary (and you compiled QEMU by selecting a different
one during the "configure" step). This happens because tracetool-test.py
executes scripts/tracetool.py directly, so that this script is run via
its shebang line. To fix the issue, use the same Python interpreter to
run scripts/tracetool.py as we are using to run the tracetool-test.py
script.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260115155318.37823-1-thuth@redhat.com>

tests/tracetool/tracetool-test.py

index 30006a9919070b6affb224012ac7fae6ad5e16b3..59e9ab3d6ef7c7f8a36c0bb3ad069b244da8a740 100755 (executable)
@@ -36,7 +36,8 @@ def test_tracetool_one(tracetool, backend, fmt, src_dir, build_dir):
     actual_file = Path(build_dir, rel_filename)
     expect_file = Path(src_dir, rel_filename)
 
-    args = [tracetool, f"--format={fmt}", f"--backends={backend}", "--group=testsuite"]
+    args = [sys.executable, tracetool,
+            f"--format={fmt}", f"--backends={backend}", "--group=testsuite"]
 
     if fmt.find("stap") != -1:
         args += ["--binary=qemu", "--probe-prefix=qemu"]