summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-06-04 18:09:06 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-06-04 18:09:06 +0200
commit02cadb882b60b33a86b2ffc4d3e2320c16e66c7b (patch)
tree355b3ce168ea8e406f3c82298489044bb15a2a19 /lib
parent669caefccb431a79dcdb1d3743afbac86c84630a (diff)
downloadspack-02cadb882b60b33a86b2ffc4d3e2320c16e66c7b.tar.gz
spack-02cadb882b60b33a86b2ffc4d3e2320c16e66c7b.tar.bz2
spack-02cadb882b60b33a86b2ffc4d3e2320c16e66c7b.tar.xz
spack-02cadb882b60b33a86b2ffc4d3e2320c16e66c7b.zip
unit test : suffixes
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/modules.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py
index f695bf75f1..7f4643409e 100644
--- a/lib/spack/spack/test/modules.py
+++ b/lib/spack/spack/test/modules.py
@@ -135,6 +135,17 @@ configuration_wrong_conflicts = {
}
}
+configuration_suffix = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'mpileaks': {
+ 'suffixes': {
+ '+debug': 'foo',
+ '~debug': 'bar'
+ }
+ }
+ }
+}
class HelperFunctionsTests(unittest.TestCase):
@@ -282,6 +293,20 @@ class TclTests(MockPackagesTest):
spack.modules.CONFIGURATION = configuration_wrong_conflicts
self.assertRaises(SystemExit, self.get_modulefile_content, spec)
+
+ def test_suffixes(self):
+ spack.modules.CONFIGURATION = configuration_suffix
+ spec = spack.spec.Spec('mpileaks+debug arch=x86-linux')
+ spec.concretize()
+ generator = spack.modules.TclModule(spec)
+ self.assertTrue('foo' in generator.use_name)
+
+ spec = spack.spec.Spec('mpileaks~debug arch=x86-linux')
+ spec.concretize()
+ generator = spack.modules.TclModule(spec)
+ self.assertTrue('bar' in generator.use_name)
+
+
configuration_dotkit = {
'enable': ['dotkit'],
'dotkit': {