From 083b7b46d92605269df05a9267657acf5e4b4677 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 16:17:54 -0800 Subject: [PATCH] Added more tests --- lib/spack/spack/test/operating_system.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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.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 @@ def setUp(self): 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 @@ def test_cray_front_end_operating_system(self): 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 @@ def test_linux_operating_system(self): 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)