summaryrefslogtreecommitdiff
path: root/tests.as-root
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-11-14 16:51:48 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-11-14 17:02:58 +0000
commit70564c6457b732e1dd35384971da5df3c5a1665b (patch)
treefec929625b46df3eca62f4f316bef90f6128c51a /tests.as-root
parent4a2b2aa38b85971b72c925eea5ca18767c63cc50 (diff)
downloadmorph-70564c6457b732e1dd35384971da5df3c5a1665b.tar.gz
Tidy up command tests
Be consistent about placement of test description, blank lines, etc.
Diffstat (limited to 'tests.as-root')
-rwxr-xr-xtests.as-root/archless-system-fails.script12
-rwxr-xr-xtests.as-root/build-with-external-strata.script3
-rwxr-xr-xtests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script4
-rwxr-xr-xtests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script5
-rwxr-xr-xtests.as-root/building-a-system-branch-works-anywhere.script5
-rwxr-xr-xtests.as-root/building-creates-correct-temporary-refs.script5
-rwxr-xr-xtests.as-root/disk-builds-rootfs-and-kernel.script11
-rwxr-xr-xtests.as-root/make-patch.script11
-rwxr-xr-xtests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script13
-rwxr-xr-xtests.as-root/syslinux-disk-builds-rootfs-and-kernel.script13
-rwxr-xr-xtests.as-root/syslinux-fails-if-no-mbr-found.script13
-rwxr-xr-xtests.as-root/system-overlap.script13
-rwxr-xr-xtests.as-root/tarball-image-is-sensible.script13
13 files changed, 66 insertions, 55 deletions
diff --git a/tests.as-root/archless-system-fails.script b/tests.as-root/archless-system-fails.script
index ef38c2e6..074ff46f 100755
--- a/tests.as-root/archless-system-fails.script
+++ b/tests.as-root/archless-system-fails.script
@@ -1,23 +1,23 @@
#!/bin/sh
#
-# If a system has multiple strata that have the same files in them,
-# then this should be notified
-#
# Copyright (C) 2011, 2012 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.
+
+## Raise an error if system has no architecture defined.
+
set -eu
cache="$DATADIR/cache/artifacts"
diff --git a/tests.as-root/build-with-external-strata.script b/tests.as-root/build-with-external-strata.script
index 6bd14c10..c3d84ec6 100755
--- a/tests.as-root/build-with-external-strata.script
+++ b/tests.as-root/build-with-external-strata.script
@@ -14,7 +14,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# "morph build" with strata outside the branch root repository.
+
+## "morph build" with strata outside the branch root repository.
set -eu
diff --git a/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script b/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script
index bf8ecf71..6c8f5c28 100755
--- a/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script
+++ b/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script
@@ -14,8 +14,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph build" works anywhere in a workspace or system branch
-# and produces the same results every time.
+## Make sure "morph build" works anywhere in a workspace or system branch
+## and produces the same results every time.
set -eu
diff --git a/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script b/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script
index 65c25c73..73682736 100755
--- a/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script
+++ b/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script
@@ -14,8 +14,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph build" works anywhere in a workspace or system branch
-# and produces the same results every time.
+
+## Make sure "morph build" works anywhere in a workspace or system branch
+## and produces the same results every time.
set -eu
diff --git a/tests.as-root/building-a-system-branch-works-anywhere.script b/tests.as-root/building-a-system-branch-works-anywhere.script
index e79fa167..11fc6850 100755
--- a/tests.as-root/building-a-system-branch-works-anywhere.script
+++ b/tests.as-root/building-a-system-branch-works-anywhere.script
@@ -14,8 +14,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph build" works anywhere in a workspace or system branch
-# and produces the same results every time.
+
+## Make sure "morph build" works anywhere in a workspace or system branch
+## and produces the same results every time.
set -eu
diff --git a/tests.as-root/building-creates-correct-temporary-refs.script b/tests.as-root/building-creates-correct-temporary-refs.script
index 8c6f8807..be067f71 100755
--- a/tests.as-root/building-creates-correct-temporary-refs.script
+++ b/tests.as-root/building-creates-correct-temporary-refs.script
@@ -14,8 +14,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph build" works anywhere in a workspace or system branch
-# and produces the same results every time.
+
+## Make sure "morph build" works anywhere in a workspace or system branch
+## and produces the same results every time.
set -eu
diff --git a/tests.as-root/disk-builds-rootfs-and-kernel.script b/tests.as-root/disk-builds-rootfs-and-kernel.script
index 77283840..3c1b903c 100755
--- a/tests.as-root/disk-builds-rootfs-and-kernel.script
+++ b/tests.as-root/disk-builds-rootfs-and-kernel.script
@@ -1,22 +1,23 @@
#!/bin/bash
#
-# A system kind of 'disk' should create the disk image, plus a kernel file.
-#
# Copyright (C) 2012 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.
+
+## A system kind of 'disk' should create the disk image, plus a kernel file.
+
set -eu
. "$SRCDIR/tests.as-root/lib"
diff --git a/tests.as-root/make-patch.script b/tests.as-root/make-patch.script
index 59b42adf..43b0b26a 100755
--- a/tests.as-root/make-patch.script
+++ b/tests.as-root/make-patch.script
@@ -1,22 +1,23 @@
#!/bin/bash
#
-# Test making a patch between two different system images
-#
# Copyright (C) 2012 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 making a patch between two different system images.
+
set -eu
. "$SRCDIR/tests.as-root/lib"
diff --git a/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script b/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script
index 95e7a504..f1aa674a 100755
--- a/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script
+++ b/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script
@@ -1,23 +1,24 @@
#!/bin/sh
#
-# A system-kind of rootfs-tarball should build both kernel image and
-# a tarball with the root filesystem.
-#
# Copyright (C) 2011, 2012 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.
+
+# A system-kind of rootfs-tarball should build both kernel image and
+# a tarball with the root filesystem.
+
set -eu
. "$SRCDIR/scripts/python-check"
diff --git a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
index 463f2a1d..4a55cd5b 100755
--- a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
+++ b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
@@ -1,23 +1,24 @@
#!/bin/bash
#
-# A system kind of syslinux-disk should create the disk image, plus a kernel
-# file.
-#
# Copyright (C) 2011, 2012 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.
+
+# A system kind of syslinux-disk should create the disk image, plus a kernel
+# file.
+
set -eu
. "$SRCDIR/tests.as-root/lib"
diff --git a/tests.as-root/syslinux-fails-if-no-mbr-found.script b/tests.as-root/syslinux-fails-if-no-mbr-found.script
index 9357cfc9..fbf675dc 100755
--- a/tests.as-root/syslinux-fails-if-no-mbr-found.script
+++ b/tests.as-root/syslinux-fails-if-no-mbr-found.script
@@ -1,23 +1,24 @@
#!/bin/sh
#
-# A system kind of syslinux-disk should create the disk image, plus a kernel
-# file.
-#
# Copyright (C) 2011, 2012 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.
+
+# A system kind of syslinux-disk should create the disk image, plus a kernel
+# file.
+
set -eu
# We only support x86 systems with syslinux-disk.
diff --git a/tests.as-root/system-overlap.script b/tests.as-root/system-overlap.script
index 61b89f27..cc308536 100755
--- a/tests.as-root/system-overlap.script
+++ b/tests.as-root/system-overlap.script
@@ -1,23 +1,24 @@
#!/bin/sh
#
-# If a system has multiple strata that have the same files in them,
-# then this should be notified
-#
# Copyright (C) 2011, 2012 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.
+
+# If a system has multiple strata that have the same files in them,
+# then this should be noted.
+
set -eu
cache="$DATADIR/cache/artifacts"
diff --git a/tests.as-root/tarball-image-is-sensible.script b/tests.as-root/tarball-image-is-sensible.script
index 035a13c7..46510252 100755
--- a/tests.as-root/tarball-image-is-sensible.script
+++ b/tests.as-root/tarball-image-is-sensible.script
@@ -1,23 +1,24 @@
#!/bin/sh
#
-# A system kind of 'rootfs-tarball' should create a tarball containing
-# all the required files
-#
# Copyright (C) 2012 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.
+
+# A system kind of 'rootfs-tarball' should create a tarball containing
+# all the required files.
+
set -eu
. "$SRCDIR/scripts/python-check"