diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-12 14:30:38 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-16 11:34:39 +0000 |
commit | 0f14928fb700d14ed1ebb8675c26b263bf2bc58c (patch) | |
tree | 87ffb529e00cc58565235425a2aae7c3880f2a74 /morphlib/morphology_tests.py | |
parent | 41ee528492db9bd41604311b100da5a871098b3a (diff) | |
download | morph-0f14928fb700d14ed1ebb8675c26b263bf2bc58c.tar.gz |
Introduce the "show-dependencies" command and BuildDependencyGraph.
The "show-dependencies" command takes a series of build tuples and dumps
the resulting dependency graph (including strata and chunks at the
moment) to the standard output. It also dumps the resulting build order
which is a list of groups. These groups indicate which chunks and strata
can be built in parallel and are not dependent on each other.
Diffstat (limited to 'morphlib/morphology_tests.py')
-rw-r--r-- | morphlib/morphology_tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/morphlib/morphology_tests.py b/morphlib/morphology_tests.py index 0119ebc6..cac80798 100644 --- a/morphlib/morphology_tests.py +++ b/morphlib/morphology_tests.py @@ -32,6 +32,7 @@ class MorphologyTests(unittest.TestCase): def test_accepts_valid_chunk_morphology(self): morph = morphlib.morphology.Morphology( + 'repo', 'ref', MockFile(''' { "name": "hello", @@ -57,6 +58,10 @@ class MorphologyTests(unittest.TestCase): ] } }''')) + + self.assertEqual(morph.repo, 'repo') + self.assertEqual(morph.ref, 'ref') + self.assertEqual(morph.filename, 'mockfile') self.assertEqual(morph.name, 'hello') self.assertEqual(morph.kind, 'chunk') self.assertEqual(morph.description, 'desc') @@ -77,6 +82,7 @@ class MorphologyTests(unittest.TestCase): def test_build_system_defaults_to_None(self): morph = morphlib.morphology.Morphology( + 'repo', 'ref', MockFile(''' { "name": "hello", @@ -86,6 +92,7 @@ class MorphologyTests(unittest.TestCase): def test_max_jobs_defaults_to_None(self): morph = morphlib.morphology.Morphology( + 'repo', 'ref', MockFile(''' { "name": "hello", @@ -95,6 +102,7 @@ class MorphologyTests(unittest.TestCase): def test_accepts_valid_stratum_morphology(self): morph = morphlib.morphology.Morphology( + 'repo', 'ref', MockFile(''' { "name": "hello", @@ -121,6 +129,7 @@ class MorphologyTests(unittest.TestCase): def test_accepts_valid_system_morphology(self): morph = morphlib.morphology.Morphology( + 'repo', 'ref', MockFile(''' { "name": "hello", @@ -145,6 +154,7 @@ class StratumRepoTests(unittest.TestCase): def stratum(self, repo): return morphlib.morphology.Morphology( + 'repo', 'ref', MockFile(''' { "name": "hello", |