summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2016-02-22 16:17:54 -0800
committerMario Melara <maamelara@gmail.com>2016-02-22 16:17:54 -0800
commit083b7b46d92605269df05a9267657acf5e4b4677 (patch)
tree469962fe5f069453f30016a733872884618fdb11 /lib
parent3c87d137a3f0823289c52ffff87e58b8b1d7e271 (diff)
downloadspack-083b7b46d92605269df05a9267657acf5e4b4677.tar.gz
spack-083b7b46d92605269df05a9267657acf5e4b4677.tar.bz2
spack-083b7b46d92605269df05a9267657acf5e4b4677.tar.xz
spack-083b7b46d92605269df05a9267657acf5e4b4677.zip
Added more tests
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/operating_system.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py
index 9d6850bfa6..a4327dde83 100644
--- a/lib/spack/spack/test/operating_system.py
+++ b/lib/spack/spack/test/operating_system.py
@@ -11,6 +11,7 @@ from spack.platforms.linux import Linux
from spack.platforms.darwin import Darwin
from spack.operating_system.linux_distro import LinuxDistro
from spack.operating_system.mac_osx import MacOSX
+from spack.operating_system.cnl import ComputeNodeLinux
class TestOperatingSystem(unittest.TestCase):
@@ -19,6 +20,8 @@ class TestOperatingSystem(unittest.TestCase):
linux = Linux()
darwin = Darwin()
self.cray_operating_sys = cray_xc.operating_system('front_os')
+ self.cray_default_os = cray_xc.operating_system('default_os')
+ self.cray_back_os = cray_xc.operating_system('back_os')
self.darwin_operating_sys = darwin.operating_system('default_os')
self.linux_operating_sys = linux.operating_system('default_os')
@@ -28,6 +31,12 @@ class TestOperatingSystem(unittest.TestCase):
def test_cray_front_end_compiler_strategy(self):
self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH")
+ def test_cray_back_end_operating_system(self):
+ self.assertIsInstance(self.cray_back_os,ComputeNodeLinux)
+
+ def test_cray_back_end_compiler_strategy(self):
+ self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES")
+
def test_linux_operating_system(self):
print self.linux_operating_sys
self.assertIsInstance(self.linux_operating_sys, LinuxDistro)
@@ -35,7 +44,16 @@ class TestOperatingSystem(unittest.TestCase):
def test_linux_compiler_strategy(self):
self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH")
-
+
+ def test_cray_front_end_compiler_list(self):
+ """ Operating systems will now be in charge of finding compilers.
+ So, depending on which operating system you want to build for
+ or which operating system you are on, then you could detect
+ compilers in a certain way. Cray linux environment on the front
+ end is just a regular linux distro whereas the Cray linux compute
+ node is a stripped down version which modules are important
+ """
+ self.assertEquals(True, False)