diff options
author | Mario Melara <maamelara@gmail.com> | 2016-05-30 13:22:08 -0700 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2016-05-30 13:22:08 -0700 |
commit | b14ba3125033dc93afb9662ba87c2ca0acbbbde4 (patch) | |
tree | a0464785e0deaaf909c1cad8d57d4ed3a79139a7 | |
parent | 716991775d6f6541e2acf41d51ff528e4c3412c7 (diff) | |
download | spack-b14ba3125033dc93afb9662ba87c2ca0acbbbde4.tar.gz spack-b14ba3125033dc93afb9662ba87c2ca0acbbbde4.tar.bz2 spack-b14ba3125033dc93afb9662ba87c2ca0acbbbde4.tar.xz spack-b14ba3125033dc93afb9662ba87c2ca0acbbbde4.zip |
Quick fix for mock compilers.yaml to work on linux machines.
-rw-r--r-- | lib/spack/spack/test/mock_packages_test.py | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index f02bfb7a07..561f319b16 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -34,8 +34,41 @@ from ordereddict_backport import OrderedDict from spack.repository import RepoPath from spack.spec import Spec +platform = spack.architecture.sys_type() + +linux_os_name = 'debian' +linux_os_version = '6' + +if platform.name == 'linux': + global linux_os_name, linux_os_version + linux_os = platform.operating_system("default_os") + linux_os_name = linux_os.name + linux_os_version = linux_os.version + mock_compiler_config = """\ compilers: + clang3.3GENLINUX: + spec: clang@3.3 + operating_system: + name: {0} + version: '{1}' + paths: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: 'None' + gcc4.5GENLINUX: + spec: gcc@4.5.0 + operating_system: + name: {0} + version: '{1}' + paths: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: None + fc: None + modules: 'None' clang3.3CNL: spec: clang@3.3 operating_system: @@ -146,7 +179,7 @@ compilers: f77: None fc: None modules: 'None' -""" +""".format(linux_os_name, linux_os_version) mock_packages_config = """\ packages: |