diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-30 16:43:50 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-30 16:43:50 +0100 |
commit | dc589edd6f3faa94c6cbaf66c2caadff51cfbe5a (patch) | |
tree | 212299c99016c4e70b0ea5b104a2619a4fd5d3c6 | |
parent | 45655da4505ba03c84f634501ba8e8eee6f920a4 (diff) | |
download | morph-dc589edd6f3faa94c6cbaf66c2caadff51cfbe5a.tar.gz |
Change detect_build_system to not default to manual
We do not want a manual build system if there is no morphology,
since building with a no-op manual build system just hides the
fact that the chunk can't be built because a morphology is missing.
-rw-r--r-- | morphlib/buildsystem.py | 6 | ||||
-rw-r--r-- | morphlib/buildsystem_tests.py | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py index 8b71a640..a048d881 100644 --- a/morphlib/buildsystem.py +++ b/morphlib/buildsystem.py @@ -129,16 +129,14 @@ build_systems = [ def detect_build_system(srcdir): '''Automatically detect the build system, if possible. - If the build system cannot be detected automatically, then the manual - build system is used instead. + If the build system cannot be detected automatically, return None. ''' for bs in build_systems: if bs.used_by_project(srcdir): return bs - return ManualBuildSystem() - + return None def lookup_build_system(name): diff --git a/morphlib/buildsystem_tests.py b/morphlib/buildsystem_tests.py index 6d426d8c..2d688922 100644 --- a/morphlib/buildsystem_tests.py +++ b/morphlib/buildsystem_tests.py @@ -121,10 +121,10 @@ class DetectBuildSystemTests(unittest.TestCase): def tearDown(self): shutil.rmtree(self.tempdir) - def test_autodetects_manual(self): + def test_does_not_autodetect_manual(self): create_manual_project(self.tempdir) bs = morphlib.buildsystem.detect_build_system(self.tempdir) - self.assertEqual(type(bs), morphlib.buildsystem.ManualBuildSystem) + self.assertEqual(bs, None) def test_autodetects_autotools(self): create_autotools_project(self.tempdir) |