Skip to content
Merged
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
20 changes: 10 additions & 10 deletions test/easyconfigs/easyconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ def test_conflicts(self):
print("(skipped conflicts test)")
return

self.assertFalse(check_conflicts(self.ordered_specs, modules_tool(), check_inter_ec_conflicts=False),
"No conflicts detected")
self.assertEqual(check_conflicts(self.ordered_specs, modules_tool(), check_inter_ec_conflicts=False,
return_conflicts=True),
[])

def test_deps(self):
"""Perform checks on dependencies in easyconfig files"""
Expand Down Expand Up @@ -985,7 +986,6 @@ def get_deps_for(ec):
'12.2': '2022b',
'12.3': '2023a',
'13.1': None,
'13.1': None,
'13.2': '2023b',
'13.3': '2024a',
'14.1': None,
Expand Down Expand Up @@ -1781,7 +1781,7 @@ def template_easyconfig_test(self, spec):
'hpcugent.github.com/easybuild',
'hpcugent.github.io/easybuild',
]
failing_checks.extend("Old URL '%s' found" % old_url for old_url in old_urls if old_url in ec.rawtxt)
failing_checks.extend("Old URL '%s' should not be used" % old_url for old_url in old_urls if old_url in ec.rawtxt)

# Note the use of app.cfg which might contain sources populated by e.g. the Cargo easyblock
sources, patches, checksums = app.cfg.get_ref('sources'), app.cfg['patches'], app.cfg['checksums']
Expand All @@ -1800,7 +1800,7 @@ def template_easyconfig_test(self, spec):
# exception to the dependencies of binutils (since we should eventually build a new binutils with GCCcore)
if ec['toolchain']['version'] == 'system':
binutils_complete_dependencies = ['M4', 'Bison', 'flex', 'help2man', 'zlib', 'binutils']
requires_binutils &= bool(ec['name'] not in binutils_complete_dependencies)
requires_binutils &= ec['name'] not in binutils_complete_dependencies

# if no sources/extensions/components are specified, it's just a bundle (nothing is being compiled)
requires_binutils &= bool(sources or ec.get_ref('exts_list') or ec.get_ref('components'))
Expand All @@ -1809,9 +1809,9 @@ def template_easyconfig_test(self, spec):
# dependencies() returns both build and runtime dependencies
# in some cases, binutils can also be a runtime dep (e.g. for Clang)
# Also using GCC directly as a build dep is also allowed (it includes the correct binutils)
dep_names = [d['name'] for d in ec.dependencies()]
dep_names = ec.dependency_names()
if 'binutils' not in dep_names and 'GCC' not in dep_names:
failing_checks.append("binutils or GCC is a build dep: " + str(dep_names))
failing_checks.append("binutils or GCC should be in build deps: " + str(dep_names))

# make sure that OpenSSL wrapper is used rather than OS dependency,
# for easyconfigs using a 2021a (sub)toolchain or more recent common toolchain version
Expand Down Expand Up @@ -1862,7 +1862,7 @@ def template_easyconfig_test(self, spec):

# Need to check now as collect_exts_file_info relies on correct exts_list
if failing_checks:
self.fail('Verification for %s failed:\n' % os.path.basename(spec) + '\n'.join(set(failing_checks)))
self.fail('Verification of %s failed:\n' % os.path.basename(spec) + '\n'.join(set(failing_checks)))

# After the sanity check above, use collect_exts_file_info to resolve templates etc. correctly
for ext in app.collect_exts_file_info(fetch_files=False, verify_checksums=False):
Expand Down Expand Up @@ -1950,7 +1950,7 @@ def template_easyconfig_test(self, spec):
# use of `True` is deprecated in favour of the more intuitive `SYSTEM` template
if orig_dep[3] is True:
failing_checks.append(
"use of `True` to indicate the system toolchain for "
"Use of `True` to indicate the system toolchain for "
"%s is deprecated, use the `SYSTEM` template constant instead" % desc
)
elif orig_dep[3] != dumped_dep[3]:
Expand Down Expand Up @@ -2000,7 +2000,7 @@ def template_easyconfig_test(self, spec):
failing_checks.append(fail_msg)

if failing_checks:
self.fail('Verification for %s failed:\n' % os.path.basename(spec) + '\n'.join(failing_checks))
self.fail('Verification of %s failed:\n' % os.path.basename(spec) + '\n'.join(failing_checks))

# test passed, so set back
single_tests_ok = prev_single_tests_ok
Expand Down
Loading