Skip to content
Snippets Groups Projects
Commit f3a1a8c6 authored by Seth R. Johnson's avatar Seth R. Johnson Committed by Todd Gamblin
Browse files

Uniquify suffixes added to module names (#14920)

parent b02981f1
No related branches found
No related tags found
No related merge requests found
...@@ -428,6 +428,7 @@ def suffixes(self): ...@@ -428,6 +428,7 @@ def suffixes(self):
for constraint, suffix in self.conf.get('suffixes', {}).items(): for constraint, suffix in self.conf.get('suffixes', {}).items():
if constraint in self.spec: if constraint in self.spec:
suffixes.append(suffix) suffixes.append(suffix)
suffixes = sorted(set(suffixes))
if self.hash: if self.hash:
suffixes.append(self.hash) suffixes.append(self.hash)
return suffixes return suffixes
......
...@@ -5,3 +5,4 @@ tcl: ...@@ -5,3 +5,4 @@ tcl:
suffixes: suffixes:
'+debug': foo '+debug': foo
'~debug': bar '~debug': bar
'^mpich': foo
...@@ -215,9 +215,10 @@ def test_suffixes(self, module_configuration, factory): ...@@ -215,9 +215,10 @@ def test_suffixes(self, module_configuration, factory):
writer, spec = factory('mpileaks+debug arch=x86-linux') writer, spec = factory('mpileaks+debug arch=x86-linux')
assert 'foo' in writer.layout.use_name assert 'foo' in writer.layout.use_name
assert 'foo-foo' not in writer.layout.use_name
writer, spec = factory('mpileaks~debug arch=x86-linux') writer, spec = factory('mpileaks~debug arch=x86-linux')
assert 'bar' in writer.layout.use_name assert 'bar-foo' in writer.layout.use_name
def test_setup_environment(self, modulefile_content, module_configuration): def test_setup_environment(self, modulefile_content, module_configuration):
"""Tests the internal set-up of run-time environment.""" """Tests the internal set-up of run-time environment."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment