From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>,
"Stefan Weil" <sw@weilnetz.de>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alexandre Iooss" <erdnaxe@crans.org>,
"Yonggang Luo" <luoyonggang@gmail.com>
Subject: [PATCH 1/2] tests/functional: Introduce the dso_suffix() helper
Date: Wed, 19 Feb 2025 20:23:39 +0100 [thread overview]
Message-ID: <20250219192340.92240-2-philmd@linaro.org> (raw)
In-Reply-To: <20250219192340.92240-1-philmd@linaro.org>
Introduce a helper to get the default shared library
suffix used on the host.
Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
tests/functional/qemu_test/__init__.py | 2 +-
tests/functional/qemu_test/cmd.py | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py
index 5c972843a6d..e253288ee7f 100644
--- a/tests/functional/qemu_test/__init__.py
+++ b/tests/functional/qemu_test/__init__.py
@@ -8,7 +8,7 @@
from .asset import Asset
from .config import BUILD_DIR
-from .cmd import is_readable_executable_file, \
+from .cmd import is_readable_executable_file, dso_suffix, \
interrupt_interactive_console_until_pattern, wait_for_console_pattern, \
exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which
from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py
index dc5f422b77d..c4704dfb7bc 100644
--- a/tests/functional/qemu_test/cmd.py
+++ b/tests/functional/qemu_test/cmd.py
@@ -14,6 +14,12 @@
import logging
import os
import os.path
+import platform
+
+def dso_suffix():
+ '''Return the dynamic libraries suffix for the current platform'''
+ DSO_SUFFIXES = { 'Linux': 'so', 'Darwin': 'dylib', 'Windows': 'dll' }
+ return DSO_SUFFIXES[platform.system()]
def which(tool):
--
2.47.1
next prev parent reply other threads:[~2025-02-19 19:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 19:23 [PATCH 0/2] tests/functional: Allow running TCG plugins tests on macOS Philippe Mathieu-Daudé
2025-02-19 19:23 ` Philippe Mathieu-Daudé [this message]
2025-02-19 19:28 ` [PATCH 1/2] tests/functional: Introduce the dso_suffix() helper Pierrick Bouvier
2025-02-20 5:59 ` Thomas Huth
2025-02-19 19:23 ` [PATCH 2/2] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts Philippe Mathieu-Daudé
2025-02-19 19:29 ` Pierrick Bouvier
2025-02-20 6:02 ` Thomas Huth
2025-02-20 7:06 ` Stefan Weil via
2025-02-24 9:56 ` Daniel P. Berrangé
2025-02-19 20:30 ` [PATCH 0/2] tests/functional: Allow running TCG plugins tests on macOS Pierrick Bouvier
2025-02-19 21:19 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250219192340.92240-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=erdnaxe@crans.org \
--cc=luoyonggang@gmail.com \
--cc=ma.mandourr@gmail.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).