Skip to content

Commit 2f08505

Browse files
committed
Properly define sched_options in the configuration schema
1 parent c3d5fce commit 2f08505

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

reframe/schemas/config.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,6 @@
102102
}
103103
]
104104
},
105-
"sched_options": {
106-
"type": "object",
107-
"properties": {
108-
"ignore_reqnodenotavail": {"type": "boolean"},
109-
"job_submit_timeout": {"type": "number"},
110-
"resubmit_on_errors": {
111-
"type": "array",
112-
"items": {"type": "string"}
113-
},
114-
"use_nodes_option": {"type": "boolean"}
115-
}
116-
},
117105
"stream_handler": {
118106
"allOf": [
119107
{"$ref": "#/defs/handler_common"},
@@ -268,6 +256,19 @@
268256
"sge", "slurm", "squeue", "torque"
269257
]
270258
},
259+
"sched_options": {
260+
"type": "object",
261+
"properties": {
262+
"ignore_reqnodenotavail": {"type": "boolean"},
263+
"job_submit_timeout": {"type": "number"},
264+
"resubmit_on_errors": {
265+
"type": "array",
266+
"items": {"type": "string"}
267+
},
268+
"use_nodes_option": {"type": "boolean"}
269+
},
270+
"additionalProperties": false
271+
},
271272
"launcher": {
272273
"type": "string"
273274
},

unittests/resources/config/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
'container_platforms': [{'type': 'Sarus'}],
6363
'environs': ['PrgEnv-gnu', 'builtin'],
6464
'max_jobs': 10,
65+
'sched_options': {
66+
'use_nodes_option': False
67+
},
6568
'processor': {
6669
'arch': 'skylake',
6770
'num_cpus': 8,

unittests/test_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ def test_select_subconfig(site_config):
295295
assert (site_config.get('systems/0/partitions/0/env_vars') ==
296296
[['FOO_GPU', 'yes']])
297297
assert site_config.get('systems/0/partitions/0/max_jobs') == 10
298+
assert site_config.get('systems/0/partitions/0/sched_options') == {
299+
'use_nodes_option': False
300+
}
298301
assert site_config.get('environments/@PrgEnv-gnu/cc') == 'cc'
299302
assert site_config.get('environments/1/cxx') == 'CC'
300303
assert site_config.get('general/0/check_search_path') == ['c:d']

0 commit comments

Comments
 (0)