diff options
-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) |