Skip to content

Commit f88ab4f

Browse files
committed
Fix tests
1 parent f1482cd commit f88ab4f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ def __init__(self, ec, logfile=None):
238238
# list of locations to include in RPATH used by toolchain
239239
self.rpath_include_dirs = []
240240

241+
# directory to export RPATH wrappers to
242+
self.rpath_wrappers_dir = None
243+
241244
# logging
242245
self.log = None
243246
self.logfile = logfile

test/framework/toolchain.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,7 +3138,7 @@ def test_toolchain_prepare_rpath(self):
31383138
self.assertFalse(any(os.path.samefile(x, fake_gxx) for x in res[2:]))
31393139

31403140
def test_toolchain_prepare_rpath_external(self):
3141-
"""Test toolchain.prepare under --rpath with --rpath-wrappers-dir"""
3141+
"""Test toolchain.prepare under --rpath with rpath_wrappers_dir argument"""
31423142

31433143
# put fake 'g++' command in place that just echos its arguments
31443144
fake_gxx = os.path.join(self.test_prefix, 'fake', 'g++')
@@ -3147,13 +3147,13 @@ def test_toolchain_prepare_rpath_external(self):
31473147
os.environ['PATH'] = '%s:%s' % (os.path.join(self.test_prefix, 'fake'), os.getenv('PATH', ''))
31483148

31493149
# export the wrappers to a target location
3150-
target_wrapper_dir = os.path.join(self.test_prefix, 'target')
3150+
target_wrapper_dir = os.path.abspath(os.path.join(self.test_prefix, 'target'))
31513151
# enable --rpath for a toolchain so we test against it
3152-
init_config(build_options={'rpath': True, 'silent': True, 'rpath_wrappers_dir': target_wrapper_dir})
3152+
init_config(build_options={'rpath': True, 'silent': True})
31533153
tc = self.get_toolchain('gompi', version='2018a')
31543154
tc.set_options({'rpath': True})
31553155
# allow the underlying toolchain to be in a prepared state (which may include rpath wrapping)
3156-
tc.prepare()
3156+
tc.prepare(rpath_wrappers_dir=target_wrapper_dir)
31573157

31583158
# check that wrapper was created
31593159
target_wrapper = os.path.join(target_wrapper_dir, RPATH_WRAPPERS_SUBDIR, 'gxx_wrapper', 'g++')

0 commit comments

Comments
 (0)