Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion reframe/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,12 @@ def select_subconfig(self, system_fullname=None,
f"for system '{system_fullname}'"
)

# Verify that all environments defined by the system are defined for
# Check that handlers$ are defined for the current system
if 'handlers$' not in local_config['logging'][0]:
raise ConfigError(f"'logging/handlers$' are not defined "
f"for system {system_fullname!r}")

# Check that all environments defined by the system are defined for
# the current system
if not ignore_resolve_errors:
sys_environs = {
Expand Down
1 change: 0 additions & 1 deletion reframe/schemas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@
},
"target_systems": {"$ref": "#/defs/system_ref"}
},
"required": ["handlers$"],
"additionalProperties": false
}
},
Expand Down
8 changes: 8 additions & 0 deletions unittests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ def test_select_subconfig_ignore_no_section_errors():
site_config.select_subconfig(ignore_resolve_errors=True)


def test_select_subconfig_empty_logging():
site_config = config.load_config('reframe/core/settings.py')
site_config['logging'][0] = {}
with pytest.raises(ConfigError,
match=rf"'logging/handlers\$' are not defined"):
site_config.select_subconfig()


def test_select_subconfig(site_config):
site_config.select_subconfig('testsys')
assert len(site_config['systems']) == 1
Expand Down