summaryrefslogtreecommitdiff
path: root/tests.as-root
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-07-05 10:14:57 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-07-05 10:14:57 +0000
commit6409218928104071d0da101b94edbf31c409cba7 (patch)
tree9c6c64803d276b15d87eeab51cf7dbea7c90d9e2 /tests.as-root
parenta02462625e1ee03f53c1c8f5b52009300c20b87c (diff)
downloadmorph-6409218928104071d0da101b94edbf31c409cba7.tar.gz
Remove "morph make-patch" since it doesn't work
In addition, when we start using tbdiff for upgrades, all of this will need to be re-designed and re-implemented anyway. The current plugin is dead code. Note that the test suite had already been disabled.
Diffstat (limited to 'tests.as-root')
-rwxr-xr-xtests.as-root/make-patch.script93
-rw-r--r--tests.as-root/make-patch.stdout5
2 files changed, 0 insertions, 98 deletions
diff --git a/tests.as-root/make-patch.script b/tests.as-root/make-patch.script
deleted file mode 100755
index 728088ea..00000000
--- a/tests.as-root/make-patch.script
+++ /dev/null
@@ -1,93 +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.
-
-
-# TEST DISABLED FOR NOW, SINCE make-patch DOES NOT WORK WITH ROOTFS-TARBALL
-# SYSTEM IMAGES, ONLY ON **COMPRESSED** DISK IMAGES.
-cat "$SRCDIR/tests.as-root/make-patch.stdout"
-exit 0
-
-## Test making a patch between two different system images.
-
-set -eu
-
-. "$SRCDIR/tests.as-root/lib"
-
-# Build first image. Remember the stratum.
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs master linux-system
-img1=$(find "$DATADIR/cache/artifacts" -maxdepth 1 -name '*.system.*-rootfs')
-
-# Modify the chunk, in a new branch.
-"$SRCDIR/scripts/run-git-in" "$DATADIR/chunk-repo" checkout --quiet farrokh
-"$SRCDIR/scripts/run-git-in" "$DATADIR/chunk-repo" checkout --quiet -b alfred
-sed -i s/hello/goodbye/ "$DATADIR/chunk-repo/hello.c"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/chunk-repo" commit -am goodbye \
- > /dev/null
-
-# Modify the morphs repo to use the new chunk branch, creating a new
-# branch for the morphs repo.
-"$SRCDIR/scripts/run-git-in" "$DATADIR/morphs" checkout --quiet -b alfred
-sed -i 's/farrokh/alfred/' "$DATADIR/morphs/hello-stratum.morph"
-sed -i 's/master/alfred/' "$DATADIR/morphs/hello-system.morph"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/morphs" commit -am goodbye \
- > /dev/null
-
-# Build second image.
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs alfred linux-system
-img2=$(find "$DATADIR/cache/artifacts" -maxdepth 1 -name '*.system.*' \
- ! -name $(basename "$img1"))
-
-# Make the patch.
-patch="$DATADIR/patch"
-"$SRCDIR/scripts/test-morph" make-patch "$patch" \
- test:morphs master linux-system.morph \
- test:morphs alfred linux-system.morph
-
-# Big Scary WARNING: The test from here-on down is disabled
-# Not because of bugs in Morph but because the images are compressed
-# and we have no reliable way within Baserock of uncompressing them
-# while maintaining sparseness. Once we can sort that, remove the
-# cat and the exit.
-cat <<EOF
-old version:
-hello, world
-new version:
-goodbye, world
-Done.
-EOF
-exit 0
-
-mkdir -p "$DATADIR/unpacked"
-device=$(loopback_rootfs "$img1")
-mount -o subvol=factory-run "$device" "$DATADIR/unpacked"
-trap 'cd /; umount -d "$device"' INT TERM ERR
-
-cd "$DATADIR/unpacked"
-echo "old version:"
-./bin/hello
-
-# Apply patch, run program again. We should get updated output.
-tbdiff-deploy "$patch" 2>/dev/null
-echo "new version:"
-./bin/hello
-
-echo "Done."
-
-cd /
-umount -d "$device"
diff --git a/tests.as-root/make-patch.stdout b/tests.as-root/make-patch.stdout
deleted file mode 100644
index b52a681e..00000000
--- a/tests.as-root/make-patch.stdout
+++ /dev/null
@@ -1,5 +0,0 @@
-old version:
-hello, world
-new version:
-goodbye, world
-Done.