Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarak committed Feb 3, 2023
2 parents 882fdd0 + a96aec5 commit 6c3d163
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"metadata": {},
"outputs": [],
"source": [
"%ipcluster start -n 2 --mpi"
"%ipcluster start -n 2"
]
},
{
Expand All @@ -43,7 +43,7 @@
"metadata": {},
"outputs": [],
"source": [
"%ipcluster start -n 2 --mpi"
"%ipcluster start -n 2"
]
},
{
Expand All @@ -52,7 +52,7 @@
"metadata": {},
"outputs": [],
"source": [
"%ipcluster start -n 2 --mpi"
"%ipcluster start -n 2"
]
},
{
Expand All @@ -61,7 +61,7 @@
"metadata": {},
"outputs": [],
"source": [
"%ipcluster start -n 2 --mpi"
"%ipcluster start -n 2"
]
},
{
Expand All @@ -70,7 +70,7 @@
"metadata": {},
"outputs": [],
"source": [
"%ipcluster start -n 2 --mpi"
"%ipcluster start -n 2"
]
},
{
Expand All @@ -94,6 +94,15 @@
"print('cluster ids:', c.ids)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"c.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
2 changes: 1 addition & 1 deletion reframe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import sys

VERSION = '4.1.0-dev.2'
VERSION = '4.1.0-dev.3'
INSTALL_PREFIX = os.path.normpath(
os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
)
Expand Down
9 changes: 9 additions & 0 deletions reframe/frontend/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,15 @@ def print_infoline(param, value):
f'{len(testcases)} remaining'
)

# Warn on any unset test variables for the final set of selected tests
for clsname in {type(tc.check).__name__ for tc in testcases}:
varlist = ', '.join(f'{v!r}' for v in loader.unset_vars(clsname))
if varlist:
printer.warning(
f'test {clsname!r}: '
f'the following variables were not set: {varlist}'
)

# Filter in failed cases
if options.failed:
if options.restore_session is None:
Expand Down
18 changes: 7 additions & 11 deletions reframe/frontend/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ def __init__(self, load_path, recurse=False, external_vars=None,

# Variables set in the command line
self._external_vars = external_vars or {}
self._unset_vars = {}
self._skip_system_check = bool(skip_system_check)
self._skip_prgenv_check = bool(skip_prgenv_check)

def unset_vars(self, testname):
return self._unset_vars.get(testname, [])

def _module_name(self, filename):
'''Figure out a module name from filename.
Expand Down Expand Up @@ -133,7 +137,7 @@ def _set_defaults(self, test_registry):
if test_registry is None:
return

unset_vars = {}
self._unset_vars = {}
for test in test_registry:
for name, val in self._external_vars.items():
if '.' in name:
Expand All @@ -149,16 +153,8 @@ def _set_defaults(self, test_registry):
val = fields.make_convertible(val)

if not test.setvar(varname, val):
unset_vars.setdefault(test.__name__, [])
unset_vars[test.__name__].append(varname)

# Warn for all unset variables
for testname, varlist in unset_vars.items():
varlist = ', '.join(f'{v!r}' for v in varlist)
getlogger().warning(
f'test {testname!r}: '
f'the following variables were not set: {varlist}'
)
self._unset_vars.setdefault(test.__name__, [])
self._unset_vars[test.__name__].append(varname)

def load_from_module(self, module):
'''Load user checks from module.
Expand Down

0 comments on commit 6c3d163

Please sign in to comment.