From d07c41d22df87d0722218f9560b6376165dbe7e8 Mon Sep 17 00:00:00 2001 From: Andreas Simbuerger Date: Fri, 21 Nov 2025 22:17:40 +0100 Subject: [PATCH] feat (source): make version separator configurable --- benchbuild/settings.py | 26 ++++++++++++++++++-------- benchbuild/source/base.py | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/benchbuild/settings.py b/benchbuild/settings.py index 97cf3ad89..7e8bc03af 100644 --- a/benchbuild/settings.py +++ b/benchbuild/settings.py @@ -234,12 +234,16 @@ "default": True }, "multithread": { - "desc": "Hint SLURM to disable multithreading. False adds --hint=nomultithread.", - "default": False + "desc": + "Hint SLURM to disable multithreading. False adds --hint=nomultithread.", + "default": + False }, "turbo": { - "desc": "Enable Intel Turbo Boost via SLURM. False adds --pstate-turbo=off.", - "default": False + "desc": + "Enable Intel Turbo Boost via SLURM. False adds --pstate-turbo=off.", + "default": + False }, "logs": { "desc": "Location the SLURM logs will be stored", @@ -384,13 +388,15 @@ }, "storage_driver": { "default": None, - "desc": "Storage driver for containers." - "If 'null' use podman's default." + "desc": + "Storage driver for containers." + "If 'null' use podman's default." }, "storage_opts": { "default": [], - "desc": "Storage options for containers." - "If 'null', ignore 'storage.conf'." + "desc": + "Storage options for containers." + "If 'null', ignore 'storage.conf'." }, "seccomp_config": { "default": None, @@ -517,6 +523,10 @@ } CFG["versions"] = { + "separator": { + "default": ",", + "desc": "Separator used to join versions." + }, "full": { "default": False, "desc": "Ignore default sampling and provide full version exploration." diff --git a/benchbuild/source/base.py b/benchbuild/source/base.py index 7a851a8d2..4cc0697cf 100644 --- a/benchbuild/source/base.py +++ b/benchbuild/source/base.py @@ -175,7 +175,7 @@ def to_str(*variants: Variant) -> str: Returns: string representation of all input variants joined by ','. """ - return ",".join([str(i) for i in variants]) + return str(CFG["versions"]["separator"]).join([str(i) for i in variants]) class Fetchable(Protocol):