update compiler config test.
This commit is contained in:
parent
d869d8e86f
commit
aa00999fca
@ -33,39 +33,43 @@
|
|||||||
|
|
||||||
# Some sample compiler config data
|
# Some sample compiler config data
|
||||||
a_comps = {
|
a_comps = {
|
||||||
"gcc@4.7.3" : {
|
"all": {
|
||||||
"cc" : "/gcc473",
|
"gcc@4.7.3" : {
|
||||||
"cxx" : "/g++473",
|
"cc" : "/gcc473",
|
||||||
"f77" : None,
|
"cxx": "/g++473",
|
||||||
"f90" : None },
|
"f77": None,
|
||||||
"gcc@4.5.0" : {
|
"fc" : None },
|
||||||
"cc" : "/gcc450",
|
"gcc@4.5.0" : {
|
||||||
"cxx" : "/g++450",
|
"cc" : "/gcc450",
|
||||||
"f77" : "/gfortran",
|
"cxx": "/g++450",
|
||||||
"f90" : "/gfortran" },
|
"f77": "/gfortran",
|
||||||
"clang@3.3" : {
|
"fc" : "/gfortran" },
|
||||||
"cc" : "<overwritten>",
|
"clang@3.3" : {
|
||||||
"cxx" : "<overwritten>",
|
"cc" : "<overwritten>",
|
||||||
"f77" : "<overwritten>",
|
"cxx": "<overwritten>",
|
||||||
"f90" : "<overwritten>" }
|
"f77": "<overwritten>",
|
||||||
|
"fc" : "<overwritten>" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
b_comps = {
|
b_comps = {
|
||||||
"icc@10.0" : {
|
"all": {
|
||||||
"cc" : "/icc100",
|
"icc@10.0" : {
|
||||||
"cxx" : "/icc100",
|
"cc" : "/icc100",
|
||||||
"f77" : None,
|
"cxx": "/icc100",
|
||||||
"f90" : None },
|
"f77": None,
|
||||||
"icc@11.1" : {
|
"fc" : None },
|
||||||
"cc" : "/icc111",
|
"icc@11.1" : {
|
||||||
"cxx" : "/icp111",
|
"cc" : "/icc111",
|
||||||
"f77" : "/ifort",
|
"cxx": "/icp111",
|
||||||
"f90" : "/ifort" },
|
"f77": "/ifort",
|
||||||
"clang@3.3" : {
|
"fc" : "/ifort" },
|
||||||
"cc" : "/clang",
|
"clang@3.3" : {
|
||||||
"cxx" : "/clang++",
|
"cc" : "/clang",
|
||||||
"f77" : None,
|
"cxx": "/clang++",
|
||||||
"f90" : None}
|
"f77": 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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user