diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-04 22:24:16 +0000 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2025-03-10 10:30:00 +0000 |
| commit | 3a7b9054b8d761e61628e67e90b118d05b4a4697 (patch) | |
| tree | fa196bac2531b506418242655fad90aff8b2bd8f /tests/functional/qemu_test/config.py | |
| parent | 892b06c40e46656b07579b9f4fb7a8f2652cacf2 (diff) | |
| download | focaccia-qemu-3a7b9054b8d761e61628e67e90b118d05b4a4697.tar.gz focaccia-qemu-3a7b9054b8d761e61628e67e90b118d05b4a4697.zip | |
tests/functional: Introduce the dso_suffix() helper
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> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20250220080215.49165-3-philmd@linaro.org> [AJB: dropped whitespace cmd.py damage] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250304222439.2035603-10-alex.bennee@linaro.org>
Diffstat (limited to 'tests/functional/qemu_test/config.py')
| -rw-r--r-- | tests/functional/qemu_test/config.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/config.py b/tests/functional/qemu_test/config.py index edd75b7fd0..6d4c9c3ce1 100644 --- a/tests/functional/qemu_test/config.py +++ b/tests/functional/qemu_test/config.py @@ -13,6 +13,7 @@ import os from pathlib import Path +import platform def _source_dir(): @@ -34,3 +35,14 @@ def _build_dir(): raise Exception("Cannot identify build dir, set QEMU_BUILD_ROOT") BUILD_DIR = _build_dir() + +def dso_suffix(): + '''Return the dynamic libraries suffix for the current platform''' + + if platform.system() == "Darwin": + return "dylib" + + if platform.system() == "Windows": + return "dll" + + return "so" |