update compiler config test.

This commit is contained in:
Todd Gamblin 2016-01-14 12:00:56 -08:00
parent d869d8e86f
commit aa00999fca

View File

@ -33,39 +33,43 @@
# Some sample compiler config data # Some sample compiler config data
a_comps = { a_comps = {
"all": {
"gcc@4.7.3" : { "gcc@4.7.3" : {
"cc" : "/gcc473", "cc" : "/gcc473",
"cxx" : "/g++473", "cxx": "/g++473",
"f77" : None, "f77": None,
"f90" : None }, "fc" : None },
"gcc@4.5.0" : { "gcc@4.5.0" : {
"cc" : "/gcc450", "cc" : "/gcc450",
"cxx" : "/g++450", "cxx": "/g++450",
"f77" : "/gfortran", "f77": "/gfortran",
"f90" : "/gfortran" }, "fc" : "/gfortran" },
"clang@3.3" : { "clang@3.3" : {
"cc" : "<overwritten>", "cc" : "<overwritten>",
"cxx" : "<overwritten>", "cxx": "<overwritten>",
"f77" : "<overwritten>", "f77": "<overwritten>",
"f90" : "<overwritten>" } "fc" : "<overwritten>" }
}
} }
b_comps = { b_comps = {
"all": {
"icc@10.0" : { "icc@10.0" : {
"cc" : "/icc100", "cc" : "/icc100",
"cxx" : "/icc100", "cxx": "/icc100",
"f77" : None, "f77": None,
"f90" : None }, "fc" : None },
"icc@11.1" : { "icc@11.1" : {
"cc" : "/icc111", "cc" : "/icc111",
"cxx" : "/icp111", "cxx": "/icp111",
"f77" : "/ifort", "f77": "/ifort",
"f90" : "/ifort" }, "fc" : "/ifort" },
"clang@3.3" : { "clang@3.3" : {
"cc" : "/clang", "cc" : "/clang",
"cxx" : "/clang++", "cxx": "/clang++",
"f77" : None, "f77": None,
"f90" : None} "fc" : None}
}
} }
class ConfigTest(MockPackagesTest): class ConfigTest(MockPackagesTest):
@ -85,11 +89,11 @@ def tearDown(self):
def check_config(self, comps, *compiler_names): def check_config(self, comps, *compiler_names):
"""Check that named compilers in comps match Spack's config.""" """Check that named compilers in comps match Spack's config."""
config = spack.config.get_config('compilers') config = spack.config.get_config('compilers')
compiler_list = ['cc', 'cxx', 'f77', 'f90'] compiler_list = ['cc', 'cxx', 'f77', 'fc']
for key in compiler_names: for key in compiler_names:
for c in compiler_list: for c in compiler_list:
expected = comps[key][c] expected = comps['all'][key][c]
actual = config[key][c] actual = config['all'][key][c]
self.assertEqual(expected, actual) self.assertEqual(expected, actual)