more merge work
This commit is contained in:
parent
b1e5eafb80
commit
5417f1cdc6
@ -31,8 +31,8 @@
|
|||||||
from llnl.util.tty.colify import colify
|
from llnl.util.tty.colify import colify
|
||||||
from spack.test.tally_plugin import Tally
|
from spack.test.tally_plugin import Tally
|
||||||
"""Names of tests to be included in Spack's test suite"""
|
"""Names of tests to be included in Spack's test suite"""
|
||||||
#ifdef NEW
|
|
||||||
test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage',
|
test_names = ['architecture', 'versions', 'url_parse', 'url_substitution', 'packages', 'stage',
|
||||||
'spec_syntax', 'spec_semantics', 'spec_dag', 'concretize',
|
'spec_syntax', 'spec_semantics', 'spec_dag', 'concretize',
|
||||||
'multimethod', 'install', 'package_sanity', 'config',
|
'multimethod', 'install', 'package_sanity', 'config',
|
||||||
'directory_layout', 'pattern', 'python_version', 'git_fetch',
|
'directory_layout', 'pattern', 'python_version', 'git_fetch',
|
||||||
@ -41,42 +41,6 @@
|
|||||||
'make_executable', 'configure_guess', 'lock', 'database',
|
'make_executable', 'configure_guess', 'lock', 'database',
|
||||||
'namespace_trie', 'yaml', 'sbang', 'environment',
|
'namespace_trie', 'yaml', 'sbang', 'environment',
|
||||||
'cmd.uninstall', 'cmd.test_install']
|
'cmd.uninstall', 'cmd.test_install']
|
||||||
#else /* not NEW */
|
|
||||||
test_names = ['architecture',
|
|
||||||
'versions',
|
|
||||||
'url_parse',
|
|
||||||
'url_substitution',
|
|
||||||
'packages',
|
|
||||||
'stage',
|
|
||||||
'spec_syntax',
|
|
||||||
'spec_semantics',
|
|
||||||
'spec_dag',
|
|
||||||
'concretize',
|
|
||||||
'multimethod',
|
|
||||||
'install',
|
|
||||||
'package_sanity',
|
|
||||||
'config',
|
|
||||||
'directory_layout',
|
|
||||||
'pattern',
|
|
||||||
'python_version',
|
|
||||||
'git_fetch',
|
|
||||||
'svn_fetch',
|
|
||||||
'hg_fetch',
|
|
||||||
'mirror',
|
|
||||||
'url_extrapolate',
|
|
||||||
'cc',
|
|
||||||
'link_tree',
|
|
||||||
'spec_yaml',
|
|
||||||
'optional_deps',
|
|
||||||
'make_executable',
|
|
||||||
'configure_guess',
|
|
||||||
'unit_install',
|
|
||||||
'lock',
|
|
||||||
'database',
|
|
||||||
'namespace_trie',
|
|
||||||
'yaml',
|
|
||||||
'sbang']
|
|
||||||
#endif /* not NEW */
|
|
||||||
|
|
||||||
|
|
||||||
def list_tests():
|
def list_tests():
|
||||||
|
@ -92,36 +92,18 @@ def test_default_works(self):
|
|||||||
self.assertEqual(pkg.has_a_default(), 'default')
|
self.assertEqual(pkg.has_a_default(), 'default')
|
||||||
|
|
||||||
|
|
||||||
#ifdef NEW
|
|
||||||
def test_architecture_match(self):
|
|
||||||
pkg = spack.repo.get('multimethod arch=x86_64')
|
|
||||||
self.assertEqual(pkg.different_by_architecture(), 'x86_64')
|
|
||||||
|
|
||||||
pkg = spack.repo.get('multimethod arch=ppc64')
|
|
||||||
self.assertEqual(pkg.different_by_architecture(), 'ppc64')
|
|
||||||
|
|
||||||
pkg = spack.repo.get('multimethod arch=ppc32')
|
|
||||||
self.assertEqual(pkg.different_by_architecture(), 'ppc32')
|
|
||||||
|
|
||||||
pkg = spack.repo.get('multimethod arch=arm64')
|
|
||||||
self.assertEqual(pkg.different_by_architecture(), 'arm64')
|
|
||||||
|
|
||||||
pkg = spack.repo.get('multimethod arch=macos')
|
|
||||||
self.assertRaises(NoSuchMethodError, pkg.different_by_architecture)
|
|
||||||
#else /* not NEW */
|
|
||||||
def test_target_match(self):
|
def test_target_match(self):
|
||||||
platform = spack.architecture.sys_type()
|
platform = spack.architecture.sys_type()
|
||||||
targets = platform.targets.values()
|
targets = platform.targets.values()
|
||||||
for target in targets[:-1]:
|
for target in targets[:-1]:
|
||||||
pkg = spack.repo.get('multimethod='+target.name)
|
pkg = spack.repo.get('multimethod target='+target.name)
|
||||||
self.assertEqual(pkg.different_by_target(), target.name)
|
self.assertEqual(pkg.different_by_target(), target.name)
|
||||||
|
|
||||||
pkg = spack.repo.get('multimethod='+targets[-1].name)
|
pkg = spack.repo.get('multimethod target='+targets[-1].name)
|
||||||
if len(targets) == 1:
|
if len(targets) == 1:
|
||||||
self.assertEqual(pkg.different_by_target(), targets[-1].name)
|
self.assertEqual(pkg.different_by_target(), targets[-1].name)
|
||||||
else:
|
else:
|
||||||
self.assertRaises(NoSuchMethodError, pkg.different_by_target)
|
self.assertRaises(NoSuchMethodError, pkg.different_by_target)
|
||||||
#endif /* not NEW */
|
|
||||||
|
|
||||||
|
|
||||||
def test_dependency_match(self):
|
def test_dependency_match(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user