Update build_system_guess test with new class name
This commit is contained in:
parent
199a8af7cc
commit
262ab40188
@ -38,7 +38,7 @@
|
|||||||
'directory_layout', 'pattern', 'python_version', 'git_fetch',
|
'directory_layout', 'pattern', 'python_version', 'git_fetch',
|
||||||
'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate',
|
'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate',
|
||||||
'cc', 'link_tree', 'spec_yaml', 'optional_deps',
|
'cc', 'link_tree', 'spec_yaml', 'optional_deps',
|
||||||
'make_executable', 'configure_guess', 'lock', 'database',
|
'make_executable', 'build_system_guess', 'lock', 'database',
|
||||||
'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.find',
|
'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.find',
|
||||||
'cmd.uninstall', 'cmd.test_install', 'cmd.test_compiler_cmd']
|
'cmd.uninstall', 'cmd.test_install', 'cmd.test_compiler_cmd']
|
||||||
|
|
||||||
|
@ -28,14 +28,14 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from llnl.util.filesystem import *
|
from llnl.util.filesystem import *
|
||||||
from spack.cmd.create import ConfigureGuesser
|
from spack.cmd.create import BuildSystemGuesser
|
||||||
from spack.stage import Stage
|
from spack.stage import Stage
|
||||||
from spack.test.mock_packages_test import *
|
from spack.test.mock_packages_test import *
|
||||||
from spack.util.executable import which
|
from spack.util.executable import which
|
||||||
|
|
||||||
|
|
||||||
class InstallTest(unittest.TestCase):
|
class InstallTest(unittest.TestCase):
|
||||||
"""Tests the configure guesser in spack create"""
|
"""Tests the build system guesser in spack create"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.tar = which('tar')
|
self.tar = which('tar')
|
||||||
@ -60,15 +60,11 @@ def check_archive(self, filename, system):
|
|||||||
with Stage(url) as stage:
|
with Stage(url) as stage:
|
||||||
stage.fetch()
|
stage.fetch()
|
||||||
|
|
||||||
guesser = ConfigureGuesser()
|
guesser = BuildSystemGuesser()
|
||||||
guesser(stage)
|
guesser(stage, url)
|
||||||
self.assertEqual(system, guesser.build_system)
|
self.assertEqual(system, guesser.build_system)
|
||||||
|
|
||||||
|
|
||||||
def test_python(self):
|
|
||||||
self.check_archive('setup.py', 'python')
|
|
||||||
|
|
||||||
|
|
||||||
def test_autotools(self):
|
def test_autotools(self):
|
||||||
self.check_archive('configure', 'autotools')
|
self.check_archive('configure', 'autotools')
|
||||||
|
|
||||||
@ -77,7 +73,17 @@ def test_cmake(self):
|
|||||||
self.check_archive('CMakeLists.txt', 'cmake')
|
self.check_archive('CMakeLists.txt', 'cmake')
|
||||||
|
|
||||||
|
|
||||||
|
def test_scons(self):
|
||||||
|
self.check_archive('SConstruct', 'scons')
|
||||||
|
|
||||||
|
|
||||||
|
def test_python(self):
|
||||||
|
self.check_archive('setup.py', 'python')
|
||||||
|
|
||||||
|
|
||||||
|
def test_R(self):
|
||||||
|
self.check_archive('NAMESPACE', 'R')
|
||||||
|
|
||||||
|
|
||||||
def test_unknown(self):
|
def test_unknown(self):
|
||||||
self.check_archive('foobar', 'unknown')
|
self.check_archive('foobar', 'unknown')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user