Update build_system_guess test with new class name

This commit is contained in:
Adam J. Stewart 2016-07-05 11:33:29 -05:00
parent 199a8af7cc
commit 262ab40188
2 changed files with 17 additions and 11 deletions

View file

@ -38,7 +38,7 @@
'directory_layout', 'pattern', 'python_version', 'git_fetch',
'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate',
'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',
'cmd.uninstall', 'cmd.test_install', 'cmd.test_compiler_cmd']

View file

@ -28,14 +28,14 @@
import unittest
from llnl.util.filesystem import *
from spack.cmd.create import ConfigureGuesser
from spack.cmd.create import BuildSystemGuesser
from spack.stage import Stage
from spack.test.mock_packages_test import *
from spack.util.executable import which
class InstallTest(unittest.TestCase):
"""Tests the configure guesser in spack create"""
"""Tests the build system guesser in spack create"""
def setUp(self):
self.tar = which('tar')
@ -60,15 +60,11 @@ def check_archive(self, filename, system):
with Stage(url) as stage:
stage.fetch()
guesser = ConfigureGuesser()
guesser(stage)
guesser = BuildSystemGuesser()
guesser(stage, url)
self.assertEqual(system, guesser.build_system)
def test_python(self):
self.check_archive('setup.py', 'python')
def test_autotools(self):
self.check_archive('configure', 'autotools')
@ -77,7 +73,17 @@ def test_cmake(self):
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):
self.check_archive('foobar', 'unknown')