Changed unsatisfiable architecture test
This commit is contained in:
parent
6926f4d0da
commit
b25da51638
@ -29,6 +29,7 @@
|
|||||||
spack/lib/spack/spack/test/mock_packages
|
spack/lib/spack/spack/test/mock_packages
|
||||||
"""
|
"""
|
||||||
import spack
|
import spack
|
||||||
|
import spack.architecture
|
||||||
import spack.package
|
import spack.package
|
||||||
|
|
||||||
from llnl.util.lang import list_modules
|
from llnl.util.lang import list_modules
|
||||||
@ -240,21 +241,12 @@ def test_unsatisfiable_compiler_version(self):
|
|||||||
self.assertRaises(spack.spec.UnsatisfiableCompilerSpecError, spec.normalize)
|
self.assertRaises(spack.spec.UnsatisfiableCompilerSpecError, spec.normalize)
|
||||||
|
|
||||||
|
|
||||||
#ifdef NEW
|
|
||||||
def test_unsatisfiable_architecture(self):
|
def test_unsatisfiable_architecture(self):
|
||||||
self.set_pkg_dep('mpileaks', 'mpich arch=bgqos_0')
|
|
||||||
spec = Spec('mpileaks ^mpich arch=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf')
|
|
||||||
self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize)
|
|
||||||
#else /* not NEW */
|
|
||||||
def test_unsatisfiable_target(self):
|
|
||||||
platform = spack.architecture.sys_type()
|
platform = spack.architecture.sys_type()
|
||||||
if len(platform.targets) > 1:
|
|
||||||
first = platform.targets.values()[0].name
|
self.set_pkg_dep('mpileaks', 'mpich target=%s' % platform.target('default_target'))
|
||||||
second = platform.targets.values()[1].name
|
spec = Spec('mpileaks ^mpich target=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf')
|
||||||
self.set_pkg_dep('mpileaks', 'mpich='+first)
|
self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize)
|
||||||
spec = Spec('mpileaks ^mpich='+ second +' ^callpath ^dyninst ^libelf ^libdwarf')
|
|
||||||
self.assertRaises(spack.spec.UnsatisfiableTargetSpecError, spec.normalize)
|
|
||||||
#endif /* not NEW */
|
|
||||||
|
|
||||||
|
|
||||||
def test_invalid_dep(self):
|
def test_invalid_dep(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user