Merge branch 'qa' into 'master'
See merge request SchedMD/dev/slurm!2057
diff --git a/testsuite/python/lib/atf.py b/testsuite/python/lib/atf.py
index 13915e9..95ba0a2 100644
--- a/testsuite/python/lib/atf.py
+++ b/testsuite/python/lib/atf.py
@@ -1286,22 +1286,23 @@
return tuple(int(part) if part.isdigit() else 0 for part in version_str.split("."))
-def require_version(version, component="sbin/slurmctld", slurm_prefix=""):
+def require_version(version, component="sbin/slurmctld", slurm_prefix="", reason=None):
"""Checks if the component is at least the required version, or skips.
Args:
version (tuple): The tuple representing the version.
component (string): The bin/ or sbin/ component of Slurm to check.
slurm_prefix (string): The path where the component is. By default the defined in testsuite.conf.
+ reason (string): The reason why the version of the component is required.
Returns:
A tuple representing the version. E.g. (25.05.0).
"""
component_version = get_version(component, slurm_prefix)
if component_version < version:
- pytest.skip(
- f"The version of {component} is {component_version}, required is {version}"
- )
+ if not reason:
+ reason = f"The version of {component} is {component_version}, required is {version}"
+ pytest.skip(reason)
def request_slurmrestd(request):
diff --git a/testsuite/python/tests/test_123_5.py b/testsuite/python/tests/test_123_5.py
index 7f85081..9b20de8 100644
--- a/testsuite/python/tests/test_123_5.py
+++ b/testsuite/python/tests/test_123_5.py
@@ -16,7 +16,12 @@
def setup():
global local_cluster_name
- atf.require_accounting()
+ atf.require_version(
+ (25, 11),
+ "bin/scontrol",
+ reason="Creating reservations with qos= added in scontrol 25.11",
+ )
+ atf.require_accounting(True)
atf.require_slurm_running()
atf.require_config_parameter_includes("AccountingStorageEnforce", "qos")
local_cluster_name = atf.get_config_parameter("ClusterName")
diff --git a/testsuite/python/tests/test_123_6.py b/testsuite/python/tests/test_123_6.py
index b0f126e..1f940c8 100644
--- a/testsuite/python/tests/test_123_6.py
+++ b/testsuite/python/tests/test_123_6.py
@@ -16,6 +16,12 @@
def setup():
global local_cluster_name
+ atf.require_version(
+ (25, 11),
+ "bin/scontrol",
+ reason="Creating reservations with allowedpartition= added in scontrol 25.11",
+ )
+ atf.require_accounting(True)
atf.require_slurm_running()
local_cluster_name = atf.get_config_parameter("ClusterName")