File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 5050from easybuild .tools .config import GENERAL_CLASS , Singleton , module_classes
5151from easybuild .tools .configobj import ConfigObj
5252from easybuild .tools .environment import modify_env
53- from easybuild .tools .filetools import copy_dir , mkdir , read_file
53+ from easybuild .tools .filetools import copy_dir , mkdir , read_file , which
5454from easybuild .tools .modules import curr_module_paths , modules_tool , reset_module_caches
5555from easybuild .tools .options import CONFIG_ENV_VAR_PREFIX , EasyBuildOptions , set_tmpdir
5656from easybuild .tools .py2vs3 import reload
@@ -124,6 +124,12 @@ def setUp(self):
124124 # make sure that the tests only pick up easyconfigs provided with the tests
125125 os .environ ['EASYBUILD_ROBOT_PATHS' ] = os .path .join (testdir , 'easyconfigs' , 'test_ecs' )
126126
127+ # make sure that the EasyBuild installation is still known even if we purge an EB module
128+ if os .getenv ('EB_SCRIPT_PATH' ) is None :
129+ eb_path = which ('eb' )
130+ if eb_path is not None :
131+ os .environ ['EB_SCRIPT_PATH' ] = eb_path
132+
127133 # make sure no deprecated behaviour is being triggered (unless intended by the test)
128134 self .orig_current_version = eb_build_log .CURRENT_VERSION
129135 self .disallow_deprecated_behaviour ()
You can’t perform that action at this time.
0 commit comments