File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,10 @@ def _merge_files(self, job):
228228 os_ext .concat_files (job .stderr , * err_glob , overwrite = True )
229229
230230 def filternodes (self , job , nodes ):
231- # Collect options that restrict node selection
232- options = job .sched_access + job .options
231+ # Collect options that restrict node selection, but we need to first
232+ # create a mutable list out of the immutable SequenceView that
233+ # sched_access is
234+ options = list (job .sched_access + job .options )
233235 if job .sched_partition :
234236 options .append ('--partition=%s' % job .sched_partition )
235237
Original file line number Diff line number Diff line change @@ -743,6 +743,18 @@ def test_sched_access_idle(self):
743743 self .prepare_job ()
744744 assert self .testjob .num_tasks == 8
745745
746+ def test_sched_access_idle_sequence_view (self ):
747+ from reframe .utility import SequenceView
748+
749+ self .testjob ._sched_flex_alloc_nodes = 'idle'
750+
751+ # Here simulate passing a readonly 'sched_access' as returned
752+ # by a 'SystemPartition' instance.
753+ self .testjob ._sched_access = SequenceView (['--constraint=f3' ])
754+ self .testjob ._sched_partition = 'p3'
755+ self .prepare_job ()
756+ assert self .testjob .num_tasks == 4
757+
746758 def test_sched_access_constraint_partition (self ):
747759 self .testjob ._sched_flex_alloc_nodes = 'all'
748760 self .testjob ._sched_access = ['--constraint=f1' , '--partition=p2' ]
You can’t perform that action at this time.
0 commit comments