Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/spack/spack/modules/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ def suffixes(self):
for constraint, suffix in self.conf.get('suffixes', {}).items():
if constraint in self.spec:
suffixes.append(suffix)
suffixes = sorted(set(suffixes))
if self.hash:
suffixes.append(self.hash)
return suffixes
Expand Down
1 change: 1 addition & 0 deletions lib/spack/spack/test/data/modules/tcl/suffix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tcl:
suffixes:
'+debug': foo
'~debug': bar
'^mpich': foo
3 changes: 2 additions & 1 deletion lib/spack/spack/test/modules/tcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ def test_suffixes(self, module_configuration, factory):

writer, spec = factory('mpileaks+debug arch=x86-linux')
assert 'foo' in writer.layout.use_name
assert 'foo-foo' not in writer.layout.use_name

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):
"""Tests the internal set-up of run-time environment."""
Expand Down