diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 43c419e626af..cf5ea29a01f3 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -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""" @@ -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, @@ -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'] @@ -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')) @@ -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 @@ -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): @@ -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]: @@ -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