summaryrefslogtreecommitdiff
path: root/tests.as-root
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 18:07:40 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 18:07:40 +0000
commit1f06e41bfe51b8b9263135902ab5d990541b8cb0 (patch)
tree3f86c60239ae910833618b185f3189808faa093d /tests.as-root
parent91b259141168df31a8f84f013d3789e8dabb0cc2 (diff)
parent37572bfd4e795576c7f2e540716056a9519d7854 (diff)
downloadmorph-1f06e41bfe51b8b9263135902ab5d990541b8cb0.tar.gz
Merge branch 'liw/simplify-system-kind'
Diffstat (limited to 'tests.as-root')
-rwxr-xr-xtests.as-root/disk-builds-rootfs-and-kernel.script55
-rw-r--r--tests.as-root/disk-builds-rootfs-and-kernel.stdout43
-rwxr-xr-xtests.as-root/syslinux-disk-builds-rootfs-and-kernel.script57
-rw-r--r--tests.as-root/syslinux-disk-builds-rootfs-and-kernel.stdout44
-rw-r--r--tests.as-root/syslinux-fails-if-no-mbr-found.exit1
-rwxr-xr-xtests.as-root/syslinux-fails-if-no-mbr-found.script33
-rw-r--r--tests.as-root/syslinux-fails-if-no-mbr-found.stderr1
-rw-r--r--tests.as-root/target-disk-too-small.exit1
-rwxr-xr-xtests.as-root/target-disk-too-small.script51
-rw-r--r--tests.as-root/target-disk-too-small.stderr1
10 files changed, 0 insertions, 287 deletions
diff --git a/tests.as-root/disk-builds-rootfs-and-kernel.script b/tests.as-root/disk-builds-rootfs-and-kernel.script
deleted file mode 100755
index 2eb57743..00000000
--- a/tests.as-root/disk-builds-rootfs-and-kernel.script
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2012,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.
-
-
-## A system kind of 'disk' should create the disk image, plus a kernel file.
-
-set -eu
-
-. "$SRCDIR/tests.as-root/lib"
-
-cache="$DATADIR/cache/artifacts"
-
-cd "$DATADIR/morphs"
-sed -e 's/system-kind: syslinux-disk/system-kind: disk/' \
- -i linux-system.morph
-git add linux-system.morph
-git commit --quiet -m "Build rootfs tarball system"
-
-rootfs=$("$SRCDIR/scripts/test-morph" --find-system-artifact \
- build-morphology test:morphs master linux-system)
-
-for suffix in kernel rootfs
-do
- if [ ! -e "$cache"/*system.linux-system-"$suffix" ];
- then
- echo "No .system.linux-system-$suffix" 1>&2
- find "$cache" 1>&2
- exit 1
- fi
-done
-
-mkdir -p "$DATADIR/mnt"
-device=$(loopback_rootfs "$rootfs")
-mount "$device" "$DATADIR/mnt"
-trap 'cd /; umount -d "$device"' INT TERM ERR
-
-cd "$DATADIR/mnt"
-find | LC_ALL=C sort -u
-sed -e 's/ on [0-9\-]\+//' "$DATADIR/mnt/factory-run/etc/os-release"
-cd "$DATADIR"
-umount -d "$device"
diff --git a/tests.as-root/disk-builds-rootfs-and-kernel.stdout b/tests.as-root/disk-builds-rootfs-and-kernel.stdout
deleted file mode 100644
index 4e8a67ae..00000000
--- a/tests.as-root/disk-builds-rootfs-and-kernel.stdout
+++ /dev/null
@@ -1,43 +0,0 @@
-.
-./boot
-./boot/System.map
-./boot/vmlinuz
-./factory
-./factory-run
-./factory-run/baserock
-./factory-run/baserock/hello-stratum.meta
-./factory-run/baserock/hello.meta
-./factory-run/baserock/linux-stratum.meta
-./factory-run/baserock/linux-system-rootfs.meta
-./factory-run/baserock/linux.meta
-./factory-run/baserock/tools-stratum.meta
-./factory-run/baserock/tools.meta
-./factory-run/bin
-./factory-run/bin/hello
-./factory-run/bin/strace
-./factory-run/boot
-./factory-run/boot/System.map
-./factory-run/boot/vmlinuz
-./factory-run/etc
-./factory-run/etc/fstab
-./factory-run/etc/os-release
-./factory-run/extlinux.conf
-./factory/baserock
-./factory/baserock/hello-stratum.meta
-./factory/baserock/hello.meta
-./factory/baserock/linux-stratum.meta
-./factory/baserock/linux-system-rootfs.meta
-./factory/baserock/linux.meta
-./factory/baserock/tools-stratum.meta
-./factory/baserock/tools.meta
-./factory/bin
-./factory/bin/hello
-./factory/bin/strace
-./factory/boot
-./factory/boot/System.map
-./factory/boot/vmlinuz
-./factory/etc
-./factory/etc/fstab
-./factory/etc/os-release
-./factory/extlinux.conf
-Baserock linux-system, built from ref master
diff --git a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
deleted file mode 100755
index cfadc452..00000000
--- a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-#
-# 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"
-
-# We only support x86 systems with syslinux-disk.
-arch=$(uname -m)
-case "$arch" in
- x86*) ;;
- *) exit 0 ;;
-esac
-
-cache="$DATADIR/cache/artifacts"
-
-rootfs=$("$SRCDIR/scripts/test-morph" --find-system-artifact \
- build-morphology test:morphs master linux-system)
-
-for suffix in kernel rootfs
-do
- if [ ! -e "$cache"/*system.linux-system-"$suffix" ];
- then
- echo "No .system.linux-system-$suffix" 1>&2
- find "$cache" 1>&2
- exit 1
- fi
-done
-
-mkdir -p "$DATADIR/mnt"
-device=$(loopback_rootfs "$rootfs")
-mount "$device" "$DATADIR/mnt"
-trap 'cd /; umount -d "$device"' INT TERM ERR
-
-cd "$DATADIR/mnt"
-find | LC_ALL=C sort -u
-sed -e 's/ on [0-9\-]\+//' "$DATADIR/mnt/factory-run/etc/os-release"
-cd "$DATADIR"
-umount -d "$device"
diff --git a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.stdout b/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.stdout
deleted file mode 100644
index ecc10ba6..00000000
--- a/tests.as-root/syslinux-disk-builds-rootfs-and-kernel.stdout
+++ /dev/null
@@ -1,44 +0,0 @@
-.
-./boot
-./boot/System.map
-./boot/vmlinuz
-./extlinux.conf
-./factory
-./factory-run
-./factory-run/baserock
-./factory-run/baserock/hello-stratum.meta
-./factory-run/baserock/hello.meta
-./factory-run/baserock/linux-stratum.meta
-./factory-run/baserock/linux-system-rootfs.meta
-./factory-run/baserock/linux.meta
-./factory-run/baserock/tools-stratum.meta
-./factory-run/baserock/tools.meta
-./factory-run/bin
-./factory-run/bin/hello
-./factory-run/bin/strace
-./factory-run/boot
-./factory-run/boot/System.map
-./factory-run/boot/vmlinuz
-./factory-run/etc
-./factory-run/etc/fstab
-./factory-run/etc/os-release
-./factory-run/extlinux.conf
-./factory/baserock
-./factory/baserock/hello-stratum.meta
-./factory/baserock/hello.meta
-./factory/baserock/linux-stratum.meta
-./factory/baserock/linux-system-rootfs.meta
-./factory/baserock/linux.meta
-./factory/baserock/tools-stratum.meta
-./factory/baserock/tools.meta
-./factory/bin
-./factory/bin/hello
-./factory/bin/strace
-./factory/boot
-./factory/boot/System.map
-./factory/boot/vmlinuz
-./factory/etc
-./factory/etc/fstab
-./factory/etc/os-release
-./factory/extlinux.conf
-Baserock linux-system, built from ref master
diff --git a/tests.as-root/syslinux-fails-if-no-mbr-found.exit b/tests.as-root/syslinux-fails-if-no-mbr-found.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests.as-root/syslinux-fails-if-no-mbr-found.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests.as-root/syslinux-fails-if-no-mbr-found.script b/tests.as-root/syslinux-fails-if-no-mbr-found.script
deleted file mode 100755
index b0d5b9bd..00000000
--- a/tests.as-root/syslinux-fails-if-no-mbr-found.script
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-#
-# 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.
-
-
-# Handle invalid syslinux MBR parameters.
-
-set -eu
-
-# We only support x86 systems with syslinux-disk.
-arch=$(uname -m)
-case "$arch" in
- x86*) ;;
- *) exit 0 ;;
-esac
-
-cache="$DATADIR/cache/artifacts"
-
-"$SRCDIR/scripts/test-morph" --syslinux-mbr-search-path=nosuchfile.bin \
- build-morphology test:morphs master linux-system > /dev/null
diff --git a/tests.as-root/syslinux-fails-if-no-mbr-found.stderr b/tests.as-root/syslinux-fails-if-no-mbr-found.stderr
deleted file mode 100644
index e9bfd741..00000000
--- a/tests.as-root/syslinux-fails-if-no-mbr-found.stderr
+++ /dev/null
@@ -1 +0,0 @@
-ERROR: No syslinux mbr found in search paths: ['nosuchfile.bin']
diff --git a/tests.as-root/target-disk-too-small.exit b/tests.as-root/target-disk-too-small.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests.as-root/target-disk-too-small.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests.as-root/target-disk-too-small.script b/tests.as-root/target-disk-too-small.script
deleted file mode 100755
index ff3a374f..00000000
--- a/tests.as-root/target-disk-too-small.script
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2011-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.
-
-
-## Handle target disk image being too small for its contents.
-
-set -eu
-
-. "$SRCDIR/tests.as-root/lib"
-
-# Shrink linux-system to the minimum btrfs will allow.
-cd "$DATADIR/morphs"
-sed -e 's/system-kind: syslinux-disk/system-kind: disk/' \
- -e 's/disk-size: 1G/disk-size: 512M/' \
- -i linux-system.morph
-git add linux-system.morph
-git commit -q -m "Make linux-system as small as possible"
-
-# Grow hello-chunk to be absurdly large.
-cd "$DATADIR/chunk-repo"
-git checkout -q farrokh
-cat <<'EOF' > hello.morph
-{
- "name": "hello",
- "kind": "chunk",
- "build-system": "dummy",
- "install-commands": [
- "dd if=/dev/zero of=\"$DESTDIR\"/huge-file seek=1048580 count=0"
- ]
-}
-EOF
-git add hello.morph
-git commit -q -m "Make hello be very big"
-
-# Ignore stdout - Morph logs a timestamped error
-"$SRCDIR/scripts/test-morph" build-morphology test:morphs master linux-system \
- > /dev/null
diff --git a/tests.as-root/target-disk-too-small.stderr b/tests.as-root/target-disk-too-small.stderr
deleted file mode 100644
index 487c72e2..00000000
--- a/tests.as-root/target-disk-too-small.stderr
+++ /dev/null
@@ -1 +0,0 @@
-ERROR: Ran out of space on linux-system-rootfs disk image. Please increase the system's disk-size.