From 2c27d8523927b0965b7b3d265eee3baf9a15c9c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 16 Sep 2025 09:16:38 +0100 Subject: [PATCH] tracetool-test: allow to run in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Create a temporary build subdirectory, to avoid conflicting with other running tests. This fixes "meson test" with tracetool-test which is parallel default. Signed-off-by: Marc-André Lureau Signed-off-by: Stefan Hajnoczi Message-id: 20250916081638.764020-9-berrange@redhat.com Message-ID: <20250908114652.1880366-1-marcandre.lureau@redhat.com> Signed-off-by: Stefan Hajnoczi --- tests/tracetool/tracetool-test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/tracetool/tracetool-test.py b/tests/tracetool/tracetool-test.py index a420597fc48..65430fdedc1 100755 --- a/tests/tracetool/tracetool-test.py +++ b/tests/tracetool/tracetool-test.py @@ -6,6 +6,7 @@ from pathlib import Path from shutil import copyfile from subprocess import check_call import sys +import tempfile def get_formats(backend): @@ -99,7 +100,8 @@ if __name__ == "__main__": print("syntax: {argv0} TRACE-TOOL BACKEND SRC-DIR BUILD-DIR", file=sys.stderr) sys.exit(1) - fail = test_tracetool(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) - if fail: - sys.exit(1) + with tempfile.TemporaryDirectory(prefix=sys.argv[4]) as tmpdir: + fail = test_tracetool(sys.argv[1], sys.argv[2], sys.argv[3], tmpdir) + if fail: + sys.exit(1) sys.exit(0) -- 2.47.3