diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-26 12:13:14 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-26 12:20:49 +0000 |
commit | 1f4f3f5782f0c0d53beccf0d4b7be2eed1dd0c35 (patch) | |
tree | 7dc303849ec557d69ae18342582ac8f67fb86e85 | |
parent | 8307902395d075e834a53e4c7d87cd31c0fe863e (diff) | |
download | morph-1f4f3f5782f0c0d53beccf0d4b7be2eed1dd0c35.tar.gz |
Add tests for building and deploying systems with null refs
-rwxr-xr-x | tests.build/build-system-with-null-refs.script | 24 | ||||
-rwxr-xr-x | tests.build/build-system-with-null-refs.setup | 23 | ||||
-rwxr-xr-x | tests.deploy/deploy-with-null-refs.script | 35 |
3 files changed, 82 insertions, 0 deletions
diff --git a/tests.build/build-system-with-null-refs.script b/tests.build/build-system-with-null-refs.script new file mode 100755 index 00000000..e23dcafa --- /dev/null +++ b/tests.build/build-system-with-null-refs.script @@ -0,0 +1,24 @@ +#!/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. + + +## Test building a system with null refs + +set -eu + +"$SRCDIR/scripts/test-morph" build-morphology \ + test:morphs-repo master hello-system diff --git a/tests.build/build-system-with-null-refs.setup b/tests.build/build-system-with-null-refs.setup new file mode 100755 index 00000000..cbf53076 --- /dev/null +++ b/tests.build/build-system-with-null-refs.setup @@ -0,0 +1,23 @@ +#!/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. + +set -eu + +cd "$DATADIR/morphs-repo" +"$SRCDIR/scripts/nullify-local-refs" test:morphs master *.morph +git add *.morph +git commit --quiet -m "Nullify all refs" diff --git a/tests.deploy/deploy-with-null-refs.script b/tests.deploy/deploy-with-null-refs.script new file mode 100755 index 00000000..c283debf --- /dev/null +++ b/tests.deploy/deploy-with-null-refs.script @@ -0,0 +1,35 @@ +#!/bin/bash +# +# 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. + + + +set -eu + + +. "$SRCDIR/tests.deploy/setup-build" + +cd "$DATADIR/workspace/branch1" +"$SRCDIR/scripts/nullify-local-refs" test:morphs master test:morphs/*.morph + +"$SRCDIR/scripts/test-morph" build hello-system + +"$SRCDIR/scripts/test-morph" build linux-system + +"$SRCDIR/scripts/test-morph" --log "$DATADIR/deploy.log" \ + deploy test_cluster \ + linux-system-2.HOSTNAME="baserock-rocks-even-more" \ + > /dev/null |