diff --git a/test_mpsd-software.py b/test_mpsd-software.py index 70340fceecd2da263e459bffb78f48953a55dc59..a18fb16210451d5f224e415a1550b61d2d8de952 100644 --- a/test_mpsd-software.py +++ b/test_mpsd-software.py @@ -456,14 +456,14 @@ def create_fake_environment(tmp_path, mpsd_release, expected_toolchain_map=None) toolchain_lmod_folder = ( tmp_path / mpsd_release / microarch / "lmod" / "Core" / "toolchains" ) - toolchain_lmod_folder.mkdir(parents=True) + toolchain_lmod_folder.mkdir(parents=True, exist_ok=True) spack_folder = tmp_path / mpsd_release / microarch / "spack" - spack_folder.mkdir(parents=True) + spack_folder.mkdir(parents=True, exist_ok=True) for toolchain in expected_toolchain_map[microarch]: - toolchain_file = toolchain_lmod_folder / f"{toolchain}.lua" - toolchain_file.touch() + toolchain_lua_file = toolchain_lmod_folder / f"{toolchain}.lua" + toolchain_lua_file.touch() - # check that the environment status is correct + return expected_toolchain_map toolchain_map = mod.environment_status(mpsd_release, tmp_path) # convert each list to a set to ensure that the order doesn't matter for microarch in expected_toolchain_map.keys():