summaryrefslogtreecommitdiff
path: root/tests.build
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-01-31 12:22:34 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-20 16:52:15 +0000
commit765331d76fc252d06b70532f869c82f8611e2b48 (patch)
tree283238f3b340bdd27368f30881b48114d0321b73 /tests.build
parent2ce8a926e858c06f76c7875dbd28616613f541dc (diff)
downloadmorph-765331d76fc252d06b70532f869c82f8611e2b48.tar.gz
buildcommand: Refuse to build chunks or strata out of context
Building invididual chunks is bad because we have no idea what build mode to use. Building individual strata would work, but all of the stratum's build dependencies would need to be built first so there would be little time saved in any case. There is also no way to test them beyond checking that the build was successful.
Diffstat (limited to 'tests.build')
-rwxr-xr-xtests.build/only-build-systems.script29
-rw-r--r--tests.build/only-build-systems.stderr2
2 files changed, 31 insertions, 0 deletions
diff --git a/tests.build/only-build-systems.script b/tests.build/only-build-systems.script
new file mode 100755
index 00000000..635a218f
--- /dev/null
+++ b/tests.build/only-build-systems.script
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 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.
+
+set -eu
+
+"$SRCDIR/scripts/test-morph" build-morphology \
+ test:morphs-repo master hello-stratum || true
+
+"$SRCDIR/scripts/test-morph" build-morphology \
+ test:chunk-repo farrokh hello || true
+
diff --git a/tests.build/only-build-systems.stderr b/tests.build/only-build-systems.stderr
new file mode 100644
index 00000000..ba7339d2
--- /dev/null
+++ b/tests.build/only-build-systems.stderr
@@ -0,0 +1,2 @@
+ERROR: Building a stratum directly is not supported
+ERROR: Building a chunk directly is not supported