Skip to content

Commit 8458582

Browse files
committed
Address PR comments
Signed-off-by: Theofilos Manitaras <teojgor@gmail.com>
1 parent 864d61e commit 8458582

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

docs/manpage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ The way the tests are generated and how they interact with the test filtering op
10601060
To achieve the previous behaviour, you should use ``--distribute=idle*``.
10611061

10621062
.. versionchanged:: 4.9
1063-
``--distribute=NODESTATE`` now allows you to specify alternative valid states using the ``|`` character.
1063+
``--distribute=NODESTATE`` now allows you to specify multiple valid states using the ``|`` character.
10641064

10651065
.. option:: -P, --parameterize=[TEST.]VAR=VAL0,VAL1,...
10661066

reframe/core/schedulers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def filter_nodes_by_state(nodelist, state):
162162
If ``avail``, only the available nodes will be returned.
163163
All other values are interpreted as a state string.
164164
The pipe character ``|`` can be used as to specify multiple
165-
alternative node states and has the highest priority.
165+
alternative node states.
166166
State match is exclusive unless the ``*`` is added at the end of the
167167
state string.
168168
When defining multiple states using ``|``, ``*`` has to be added at

unittests/test_schedulers.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,18 +1247,30 @@ def test_flex_alloc_not_enough_nodes_constraint_expr(make_flexible_job):
12471247
prepare_job(job)
12481248

12491249

1250-
def test_flex_alloc_allocated_or_idle_partition(make_flexible_job):
1250+
def test_flex_alloc_alloc_state_OR(make_flexible_job):
12511251
job = make_flexible_job('allocated|idle')
12521252
job.options = ['--partition=p3']
12531253
prepare_job(job)
12541254
assert job.num_tasks == 12
12551255

1256-
1257-
def test_flex_alloc_maint_star_or_allocated(make_flexible_job):
12581256
job = make_flexible_job('maint*|idle')
12591257
prepare_job(job)
12601258
assert job.num_tasks == 16
12611259

1260+
job = make_flexible_job('maint|avail')
1261+
job.options = ['--partition=p1']
1262+
prepare_job(job)
1263+
assert job.num_tasks == 12
1264+
1265+
job = make_flexible_job('all|idle')
1266+
prepare_job(job)
1267+
assert job.num_tasks == 16
1268+
1269+
job = make_flexible_job('allocated|idle|maint')
1270+
job.options = ['--partition=p1']
1271+
prepare_job(job)
1272+
assert job.num_tasks == 12
1273+
12621274

12631275
@pytest.fixture
12641276
def slurm_node_allocated():

0 commit comments

Comments
 (0)