diff --git a/easybuild/framework/easyconfig/easyconfig.py b/easybuild/framework/easyconfig/easyconfig.py index ac4345cc85..7c8e3b8b23 100644 --- a/easybuild/framework/easyconfig/easyconfig.py +++ b/easybuild/framework/easyconfig/easyconfig.py @@ -1279,7 +1279,7 @@ def toolchain(self): else: self.log.debug("Found easyconfig for toolchain %s version %s: %s", tcname, tcversion, tc_ecfile) tc_ec = process_easyconfig(tc_ecfile)[0] - tcdeps = tc_ec['ec'].dependencies() + tcdeps = tc_ec['ec'].dependencies(runtime_only=True) self.log.debug("Toolchain dependencies based on easyconfig: %s", tcdeps) self._toolchain = get_toolchain(self['toolchain'], self['toolchainopts'], diff --git a/test/framework/easyblock.py b/test/framework/easyblock.py index 5413c2c5b6..d2347029b0 100644 --- a/test/framework/easyblock.py +++ b/test/framework/easyblock.py @@ -3809,6 +3809,26 @@ def test_exts_deps_build_env(self): self.fail(f"Unknown type of environment variable: ${env_var}") self.assertTrue(regex.search(log_txt), f"Pattern '{regex.pattern}' not found in log output") + # verify fix made in https://github.com/easybuilders/easybuild-framework/pull/5048 + test_ec_txt = read_file(toy_ec) + test_ec_txt += textwrap.dedent(""" + toolchain = {'name': 'GCCcore', 'version': '12.3.0'} + """) + write_file(test_ec, test_ec_txt) + args = [ + test_ec, + '--rebuild', + '--debug', + ] + with self.mocked_stdout_stderr(): + with self.log_to_testlogfile(): + self.eb_main(args, raise_error=True, do_build=True, verbose=True) + + log_txt = read_file(self.logfile) + + regex = re.compile(r"\[SUCCESS\] toy/0.0-GCCcore-12.3.0", re.M) + self.assertTrue(regex.search(log_txt), f"Pattern '{regex.pattern}' not found in log output") + def suite(loader=None): """ return all the tests in this file """ diff --git a/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb b/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb index 65c1b9682f..469bd72ab9 100644 --- a/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb +++ b/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb @@ -14,7 +14,11 @@ source_urls = [ 'http://ftpmirror.gnu.org/%(namelower)s/%(namelower)s-%(version)s', # GCC auto-resolving HTTP mirror ] -#gcc_name = 'GCC' +# only here to verify the fix made in https://github.com/easybuilders/easybuild-framework/pull/5048, +# see also test_exts_deps_build_env +builddependencies = [ + ('gzip', '1.4'), +] sources = [ SOURCELOWER_TAR_BZ2,