mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
892b06c40e
commit
3a7b9054b8
2 changed files with 13 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue