Skip to content
Closed
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
13 changes: 10 additions & 3 deletions test/easyconfigs/easyconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,8 @@ def test_pr_python_packages(self):
r'ReFrame.*',
]

pythonpackage_easyblocks = ['CargoPythonBundle', 'CargoPythonPackage', 'PythonBundle', 'PythonPackage']

failing_checks = []

python_default_urls = PythonPackage.extra_options()['source_urls'][0]
Expand Down Expand Up @@ -1359,7 +1361,7 @@ def test_pr_python_packages(self):

# use_pip should be set when using PythonPackage or PythonBundle,
# or an easyblock that derives from it (except for whitelisted easyconfigs)
if easyblock in ['CargoPythonBundle', 'CargoPythonPackage', 'PythonBundle', 'PythonPackage']:
if easyblock in pythonpackage_easyblocks:
if use_pip is None and not any(re.match(regex, ec_fn) for regex in whitelist_pip):
failing_checks.append("'use_pip' should be set in %s" % ec_fn)

Expand Down Expand Up @@ -1391,11 +1393,16 @@ def test_pr_python_packages(self):
msg = "'-Python-%%(pyver)s' should no longer be included in versionsuffix in %s" % ec_fn
failing_checks.append(msg)

# require that running of "pip check" during sanity check is enabled via sanity_pip_check
if easyblock in ['CargoPythonBundle', 'CargoPythonPackage', 'PythonBundle', 'PythonPackage']:
if easyblock in pythonpackage_easyblocks:
# require that running "pip check" during sanity check is enabled via sanity_pip_check
sanity_pip_check = ec.get('sanity_pip_check') or exts_default_options.get('sanity_pip_check')
if not sanity_pip_check and not any(re.match(regex, ec_fn) for regex in whitelist_pip_check):
failing_checks.append("sanity_pip_check should be enabled in %s" % ec_fn)

# require that running "pip list" during sanity check is enabled via sanity_pip_list
sanity_pip_list = ec.get('sanity_pip_list') or exts_default_options.get('sanity_pip_list')
if not sanity_pip_list and not any(re.match(regex, ec_fn) for regex in whitelist_pip_check):
failing_checks.append("sanity_pip_list should be enabled in %s" % ec_fn)
else:
# Make sure the user packages in $HOME/.local/lib/python*/ are ignored when running python commands
# For the EasyBlocks above this is handled automatically by setting $PYTHONNOUSERSITE
Expand Down