Skip to content

Commit 1064122

Browse files
authored
Merge pull request #3309 from terjekv/osdeps_constants
Constants for osdependecies.
2 parents 3b53953 + 3b19374 commit 1064122

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

easybuild/framework/easyconfig/constants.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,13 @@
5151
'OS_VERSION': (get_os_version(), "System version"),
5252
'SYS_PYTHON_VERSION': (platform.python_version(), "System Python version (platform.python_version())"),
5353
'SYSTEM': ({'name': 'system', 'version': 'system'}, "System toolchain"),
54+
55+
'OS_PKG_IBVERBS_DEV': (('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel'),
56+
"OS packages providing ibverbs/infiniband development support"),
57+
'OS_PKG_OPENSSL_BIN': (('openssl'),
58+
"OS packages providing the openSSL binary"),
59+
'OS_PKG_OPENSSL_LIB': (('libssl', 'libopenssl'),
60+
"OS packages providing openSSL libraries"),
61+
'OS_PKG_OPENSSL_DEV': (('openssl-devel', 'libssl-dev', 'libopenssl-devel'),
62+
"OS packages providing openSSL developement support"),
5463
}

test/framework/easyconfigparser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,13 @@ def test_easyconfig_constants(self):
180180
system_constant = constants.pop('SYSTEM')
181181
self.assertEqual(system_constant, {'name': 'system', 'version': 'system'})
182182

183-
# make sure both keys and values are only strings
183+
# make sure both keys and values are of appropriate types
184184
for constant_name in constants:
185185
self.assertTrue(isinstance(constant_name, string_type), "Constant name %s is a string" % constant_name)
186186
val = constants[constant_name]
187-
self.assertTrue(isinstance(val, (string_type, dict)), "Constant value %s is a string or dict" % val)
187+
fail_msg = "The constant %s should have an acceptable type, found %s (%s)" % (constant_name,
188+
type(val), str(val))
189+
self.assertTrue(isinstance(val, (string_type, dict, tuple)), fail_msg)
188190

189191
# check a couple of randomly picked constant values
190192
self.assertEqual(constants['SOURCE_TAR_GZ'], '%(name)s-%(version)s.tar.gz')

0 commit comments

Comments
 (0)