diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-11-01 15:31:03 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-11-01 15:31:03 +0000 |
commit | a638bc13eb16a2d454f4fcf02032ff3881e544e4 (patch) | |
tree | bcebe4ee8f140c917f9aaacdbaae2bdb6ed8bfaf /morphlib/morphology_tests.py | |
parent | 3406f96c72714081ff0b1d90aca8189389ad40ae (diff) | |
download | morph-a638bc13eb16a2d454f4fcf02032ff3881e544e4.tar.gz |
Add a way to specify build system
This is a short-cut for providing the configure, build, test, and
install commands explicitly.
Diffstat (limited to 'morphlib/morphology_tests.py')
-rw-r--r-- | morphlib/morphology_tests.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/morphlib/morphology_tests.py b/morphlib/morphology_tests.py index 3fefefdc..24e24c80 100644 --- a/morphlib/morphology_tests.py +++ b/morphlib/morphology_tests.py @@ -37,6 +37,8 @@ class MorphologyTests(unittest.TestCase): "name": "hello", "kind": "chunk", "description": "desc", + "build-system": "autotools", + "max-jobs": "42", "configure-commands": ["./configure"], "build-commands": ["make"], "test-commands": ["make check"], @@ -46,11 +48,31 @@ class MorphologyTests(unittest.TestCase): self.assertEqual(morph.kind, 'chunk') self.assertEqual(morph.description, 'desc') self.assertEqual(morph.filename, 'mockfile') + self.assertEqual(morph.build_system, 'autotools') + self.assertEqual(morph.max_jobs, 42) self.assertEqual(morph.configure_commands, ['./configure']) self.assertEqual(morph.build_commands, ['make']) self.assertEqual(morph.test_commands, ['make check']) self.assertEqual(morph.install_commands, ['make install']) + def test_build_system_defaults_to_None(self): + morph = morphlib.morphology.Morphology( + MockFile(''' + { + "name": "hello", + "kind": "chunk" + }''')) + self.assertEqual(morph.build_system, None) + + def test_max_jobs_defaults_to_None(self): + morph = morphlib.morphology.Morphology( + MockFile(''' + { + "name": "hello", + "kind": "chunk" + }''')) + self.assertEqual(morph.max_jobs, None) + def test_accepts_valid_stratum_morphology(self): morph = morphlib.morphology.Morphology( MockFile(''' |