diff options
-rw-r--r-- | morphlib/buildcommand.py | 2 | ||||
-rwxr-xr-x | tests.build/no-isolated-chunk-builds.script (renamed from tests.build/only-build-systems.script) | 10 | ||||
-rw-r--r-- | tests.build/no-isolated-chunk-builds.stderr | 1 | ||||
-rw-r--r-- | tests.build/only-build-systems.stderr | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index e27581d2..f857171e 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -82,7 +82,7 @@ class BuildCommand(object): self.lrc, self.rrc, (repo_name, ref, filename)) root_kind = srcpool.lookup(repo_name, ref, filename).morphology['kind'] - if root_kind != 'system': + if root_kind not in ['system', 'stratum']: raise morphlib.Error( 'Building a %s directly is not supported' % root_kind) diff --git a/tests.build/only-build-systems.script b/tests.build/no-isolated-chunk-builds.script index 635a218f..07e33479 100755 --- a/tests.build/only-build-systems.script +++ b/tests.build/no-isolated-chunk-builds.script @@ -16,14 +16,14 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -## Morph should refuse build a chunk or a stratum out of the context. Only -## system morphologies can be built. +## Morph should refuse build a chunk out of the context. Only +## system and stratum morphologies can be built. set -eu "$SRCDIR/scripts/test-morph" build-morphology \ - test:morphs-repo master hello-stratum || true + test:morphs-repo master hello-stratum -"$SRCDIR/scripts/test-morph" build-morphology \ - test:chunk-repo farrokh hello || true +! "$SRCDIR/scripts/test-morph" build-morphology \ + test:chunk-repo farrokh hello diff --git a/tests.build/no-isolated-chunk-builds.stderr b/tests.build/no-isolated-chunk-builds.stderr new file mode 100644 index 00000000..502ce9a6 --- /dev/null +++ b/tests.build/no-isolated-chunk-builds.stderr @@ -0,0 +1 @@ +ERROR: Building a chunk directly is not supported diff --git a/tests.build/only-build-systems.stderr b/tests.build/only-build-systems.stderr deleted file mode 100644 index ba7339d2..00000000 --- a/tests.build/only-build-systems.stderr +++ /dev/null @@ -1,2 +0,0 @@ -ERROR: Building a stratum directly is not supported -ERROR: Building a chunk directly is not supported |