summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-16 10:44:15 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-06-16 10:44:15 -0700
commitf60ae61652397c614b2e6100eb17dcdc5a99164b (patch)
tree1071983c9ed507931afc51596a5a417832692bd0
parent8867adf9428dedd42dfc92efece2a3f7498400e0 (diff)
downloadspack-f60ae61652397c614b2e6100eb17dcdc5a99164b.tar.gz
spack-f60ae61652397c614b2e6100eb17dcdc5a99164b.tar.bz2
spack-f60ae61652397c614b2e6100eb17dcdc5a99164b.tar.xz
spack-f60ae61652397c614b2e6100eb17dcdc5a99164b.zip
remove dead code, cleanup.
-rw-r--r--lib/spack/spack/test/architecture.py19
-rw-r--r--lib/spack/spack/test/spec_semantics.py49
2 files changed, 26 insertions, 42 deletions
diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py
index 3d08269dee..a6847c5744 100644
--- a/lib/spack/spack/test/architecture.py
+++ b/lib/spack/spack/test/architecture.py
@@ -23,7 +23,7 @@ class ArchitectureTest(MockPackagesTest):
def tearDown(self):
super(ArchitectureTest, self).tearDown()
-
+
def test_dict_functions_for_architecture(self):
arch = Arch()
arch.platform = spack.architecture.sys_type()
@@ -46,14 +46,6 @@ class ArchitectureTest(MockPackagesTest):
self.assertTrue( isinstance(new_arch.target, Target) )
-# def test_platform_class_and_compiler_strategies(self):
-# a = CrayXc()
-# t = a.operating_system('default_os')
-# self.assertEquals(t.compiler_strategy, 'MODULES')
-# b = Linux()
-# s = b.operating_system('default_os')
-# self.assertEquals(s.compiler_strategy, 'PATH')
-
def test_sys_type(self):
output_platform_class = sys_type()
my_arch_class = None
@@ -101,12 +93,12 @@ class ArchitectureTest(MockPackagesTest):
def test_user_input_combination(self):
os_list = self.platform.operating_sys.keys()
- target_list = self.platform.targets.keys()
+ target_list = self.platform.targets.keys()
additional = ["fe", "be", "frontend", "backend"]
os_list.extend(additional)
- target_list.extend(additional)
-
+ target_list.extend(additional)
+
combinations = itertools.product(os_list, target_list)
results = []
for arch in combinations:
@@ -117,5 +109,4 @@ class ArchitectureTest(MockPackagesTest):
results.append(spec.architecture.target == self.platform.target(t))
res = all(results)
- self.assertTrue(res)
-
+ self.assertTrue(res)
diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py
index 0b2111bfe8..9876bfd5a8 100644
--- a/lib/spack/spack/test/spec_semantics.py
+++ b/lib/spack/spack/test/spec_semantics.py
@@ -108,7 +108,8 @@ class SpecSematicsTest(MockPackagesTest):
def test_satisfies_namespaced_dep(self):
- """Ensure spec from same or unspecified namespace satisfies namespace constraint."""
+ """Ensure spec from same or unspecified namespace satisfies namespace
+ constraint."""
self.check_satisfies('mpileaks ^builtin.mock.mpich', '^mpich')
self.check_satisfies('mpileaks ^builtin.mock.mpich', '^mpi')
@@ -141,29 +142,17 @@ class SpecSematicsTest(MockPackagesTest):
def test_satisfies_architecture(self):
platform = spack.architecture.sys_type()
- self.check_satisfies('foo platform=test target=frontend os=frontend', 'platform=test target=frontend os=frontend')
- self.check_satisfies('foo platform=test target=backend os=backend', 'platform=test target=backend', 'platform=test os=backend')
- self.check_satisfies('foo platform=test target=default_target os=default_os','platform=test target=default_target os=default_os')
+ self.check_satisfies(
+ 'foo platform=test target=frontend os=frontend',
+ 'platform=test target=frontend os=frontend')
+ self.check_satisfies(
+ 'foo platform=test target=backend os=backend',
+ 'platform=test target=backend', 'platform=test os=backend')
+ self.check_satisfies(
+ 'foo platform=test target=default_target os=default_os',
+ 'platform=test target=default_target os=default_os')
-#ifdef NEW
- #def test_satisfies_architecture(self):
- # self.check_satisfies('foo arch=chaos_5_x86_64_ib', ' arch=chaos_5_x86_64_ib')
- # self.check_satisfies('foo arch=bgqos_0', ' arch=bgqos_0')
-
- # self.check_unsatisfiable('foo arch=bgqos_0', ' arch=chaos_5_x86_64_ib')
- # self.check_unsatisfiable('foo arch=chaos_5_x86_64_ib', ' arch=bgqos_0')
-#els#e /* not NEW */
- #def test_satisfies_target(self):
- # platform = spack.architecture.sys_type()
- # targets = platform.targets.values()
- # for target in targets:
- # self.check_satisfies('foo='+target.name, '='+target.name)
-#end#if /* not NEW */
-
- # for i in range(1,len(targets)):
- # self.check_unsatisfiable('foo='+targets[i-1].name, '='+targets[i].name)
-
def test_satisfies_dependencies(self):
self.check_satisfies('mpileaks^mpich', '^mpich')
self.check_satisfies('mpileaks^zmpi', '^zmpi')
@@ -176,10 +165,14 @@ class SpecSematicsTest(MockPackagesTest):
self.check_satisfies('mpileaks^mpich@2.0', '^mpich@1:3')
self.check_unsatisfiable('mpileaks^mpich@1.2', '^mpich@2.0')
- self.check_satisfies('mpileaks^mpich@2.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6')
- self.check_unsatisfiable('mpileaks^mpich@4.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6')
- self.check_unsatisfiable('mpileaks^mpich@2.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6')
- self.check_unsatisfiable('mpileaks^mpich@4.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6')
+ self.check_satisfies(
+ 'mpileaks^mpich@2.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6')
+ self.check_unsatisfiable(
+ 'mpileaks^mpich@4.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6')
+ self.check_unsatisfiable(
+ 'mpileaks^mpich@2.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6')
+ self.check_unsatisfiable(
+ 'mpileaks^mpich@4.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6')
def test_satisfies_virtual_dependencies(self):
@@ -390,7 +383,7 @@ class SpecSematicsTest(MockPackagesTest):
self.check_invalid_constraint('libelf debug=2', 'libelf debug=1')
self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"')
- self.check_invalid_constraint('libelf platform=test target=be os=be',
+ self.check_invalid_constraint('libelf platform=test target=be os=be',
'libelf target=fe os=fe')
def test_constrain_changed(self):
@@ -402,7 +395,7 @@ class SpecSematicsTest(MockPackagesTest):
self.check_constrain_changed('libelf', '~debug')
self.check_constrain_changed('libelf', 'debug=2')
self.check_constrain_changed('libelf', 'cppflags="-O3"')
-
+
platform = spack.architecture.sys_type()
self.check_constrain_changed('libelf', 'target='+platform.target('default_target').name)
self.check_constrain_changed('libelf', 'os='+platform.operating_system('default_os').name)