diff options
Diffstat (limited to 'tests.as-root')
-rwxr-xr-x | tests.as-root/build-with-external-strata.script | 1 | ||||
-rwxr-xr-x | tests.as-root/disk-builds-rootfs-and-kernel.script | 55 | ||||
-rw-r--r-- | tests.as-root/disk-builds-rootfs-and-kernel.stdout | 43 | ||||
-rw-r--r-- | tests.as-root/run-in-artifact-with-different-artifacts.stderr | 2 | ||||
-rwxr-xr-x | tests.as-root/setup | 4 | ||||
-rwxr-xr-x | tests.as-root/syslinux-disk-builds-rootfs-and-kernel.script | 57 | ||||
-rw-r--r-- | tests.as-root/syslinux-disk-builds-rootfs-and-kernel.stdout | 44 | ||||
-rw-r--r-- | tests.as-root/syslinux-fails-if-no-mbr-found.exit | 1 | ||||
-rwxr-xr-x | tests.as-root/syslinux-fails-if-no-mbr-found.script | 33 | ||||
-rw-r--r-- | tests.as-root/syslinux-fails-if-no-mbr-found.stderr | 1 | ||||
-rwxr-xr-x | tests.as-root/system-overlap.script | 6 | ||||
-rwxr-xr-x | tests.as-root/tarball-image-is-sensible.setup | 1 | ||||
-rw-r--r-- | tests.as-root/target-disk-too-small.exit | 1 | ||||
-rwxr-xr-x | tests.as-root/target-disk-too-small.script | 51 | ||||
-rw-r--r-- | tests.as-root/target-disk-too-small.stderr | 1 |
15 files changed, 11 insertions, 290 deletions
diff --git a/tests.as-root/build-with-external-strata.script b/tests.as-root/build-with-external-strata.script index 2d5d0fed..fd021399 100755 --- a/tests.as-root/build-with-external-strata.script +++ b/tests.as-root/build-with-external-strata.script @@ -38,6 +38,7 @@ cat <<EOF >> stratum2.morph "name": "linux", "repo": "test:kernel-repo", "ref": "master", + "build-mode": "test", "build-depends": [] } ] 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/run-in-artifact-with-different-artifacts.stderr b/tests.as-root/run-in-artifact-with-different-artifacts.stderr index 44e70c38..b37e8f88 100644 --- a/tests.as-root/run-in-artifact-with-different-artifacts.stderr +++ b/tests.as-root/run-in-artifact-with-different-artifacts.stderr @@ -1 +1 @@ -ERROR: Artifact TMP/cache/artifacts/293fc1b78dd2af221ae7de246ff5a59df476165704b7e366230ac8ed4c16d1b7.stratum.linux-stratum cannot be extracted or mounted +ERROR: Artifact TMP/cache/artifacts/cb886f5b5aa3c4f4a36b5f763b8330077b38681573a1edcbed3554aef0489b37.stratum.linux-stratum cannot be extracted or mounted diff --git a/tests.as-root/setup b/tests.as-root/setup index 03a438e0..b9d5d477 100755 --- a/tests.as-root/setup +++ b/tests.as-root/setup @@ -110,6 +110,7 @@ chunks: - name: hello repo: test:chunk-repo ref: farrokh + build-mode: test build-depends: [] EOF git add hello-stratum.morph @@ -125,6 +126,7 @@ chunks: - name: tools repo: test:tools-repo ref: master + build-mode: test build-depends: [] EOF git add tools-stratum.morph @@ -153,6 +155,7 @@ chunks: - name: linux repo: test:kernel-repo ref: master + build-mode: test build-depends: [] EOF git add linux-stratum.morph @@ -200,7 +203,6 @@ cat <<EOF > "$DATADIR/morph.conf" repo-alias = test=file://$DATADIR/#file://$DATADIR/ cachedir = $DATADIR/cache log = $DATADIR/morph.log -keep-path = true no-distcc = true quiet = true log = /tmp/morph.log 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/system-overlap.script b/tests.as-root/system-overlap.script index cc308536..b8888491 100755 --- a/tests.as-root/system-overlap.script +++ b/tests.as-root/system-overlap.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2011, 2012 Codethink Limited +# 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 @@ -57,12 +57,14 @@ cat <<EOF >foo-baz-stratum.morph "name": "overlap-foo-baz", "repo": "test:chunk-repo", "ref": "overlap", + "build-mode": "test", "build-depends": [] }, { "name": "linux", "repo": "test:kernel-repo", "ref": "master", + "build-mode": "test", "build-depends": ["overlap-foo-baz"] } ] @@ -77,12 +79,14 @@ cat <<EOF >foo-barqux-stratum.morph "name": "overlap-foobar", "repo": "test:chunk-repo", "ref": "overlap", + "build-mode": "test", "build-depends": [] }, { "name": "overlap-fooqux", "repo": "test:chunk-repo", "ref": "overlap", + "build-mode": "test", "build-depends": ["overlap-foobar"] } ] diff --git a/tests.as-root/tarball-image-is-sensible.setup b/tests.as-root/tarball-image-is-sensible.setup index e159070c..fa904c2c 100755 --- a/tests.as-root/tarball-image-is-sensible.setup +++ b/tests.as-root/tarball-image-is-sensible.setup @@ -84,6 +84,7 @@ cat <<EOF > link-stratum.morph "name": "links", "repo": "test:chunk-repo", "ref": "tarball-links", + "build-mode": "test", "build-depends": [] } ] 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. |