summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-09-24 21:10:25 +0000
committerRichard Maw <richard.maw@gmail.com>2014-10-01 09:30:15 +0000
commit037baabc2064700d2d2fa21cdacbf65058b3ce96 (patch)
tree9e47144f0e2179107fe5066d7c944d58e2ee71d5
parent2db961da51842807f150d0a0c293f5c5b8bd2832 (diff)
downloadmorph-037baabc2064700d2d2fa21cdacbf65058b3ce96.tar.gz
Remove run-in-artifact subcommand
It's easy enough to deploy the image.
-rw-r--r--morphlib/plugins/artifact_inspection_plugin.py2
-rw-r--r--tests.as-root/run-in-artifact-propagates-exit-code.exit1
-rwxr-xr-xtests.as-root/run-in-artifact-propagates-exit-code.script33
-rw-r--r--tests.as-root/run-in-artifact-propagates-exit-code.stderr3
-rwxr-xr-xtests.as-root/run-in-artifact-with-different-artifacts.script47
-rw-r--r--tests.as-root/run-in-artifact-with-different-artifacts.stdout32
6 files changed, 1 insertions, 117 deletions
diff --git a/morphlib/plugins/artifact_inspection_plugin.py b/morphlib/plugins/artifact_inspection_plugin.py
index 6eeece77..d47de334 100644
--- a/morphlib/plugins/artifact_inspection_plugin.py
+++ b/morphlib/plugins/artifact_inspection_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2014 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
diff --git a/tests.as-root/run-in-artifact-propagates-exit-code.exit b/tests.as-root/run-in-artifact-propagates-exit-code.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests.as-root/run-in-artifact-propagates-exit-code.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests.as-root/run-in-artifact-propagates-exit-code.script b/tests.as-root/run-in-artifact-propagates-exit-code.script
deleted file mode 100755
index d815c73d..00000000
--- a/tests.as-root/run-in-artifact-propagates-exit-code.script
+++ /dev/null
@@ -1,33 +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 that 'run-in-artifact' propagates the exit code of its command.
-
-set -eu
-
-. "$SRCDIR/tests.as-root/lib"
-
-# Build first image. Remember the stratum.
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs master linux-system
-
-system=$(find "$DATADIR/cache/artifacts" -maxdepth 1 -name '*.system.*-rootfs')
-
-# Run 'run-in-artifact' with the system artifact. The command will fail
-# and this should result in an exit code of 1 in the test.
-"$SRCDIR/scripts/test-morph" run-in-artifact "$system" -- ls i-do-not-exist
diff --git a/tests.as-root/run-in-artifact-propagates-exit-code.stderr b/tests.as-root/run-in-artifact-propagates-exit-code.stderr
deleted file mode 100644
index 98aa5450..00000000
--- a/tests.as-root/run-in-artifact-propagates-exit-code.stderr
+++ /dev/null
@@ -1,3 +0,0 @@
-ERROR: Command failed: ls i-do-not-exist
-ls: i-do-not-exist: No such file or directory
-
diff --git a/tests.as-root/run-in-artifact-with-different-artifacts.script b/tests.as-root/run-in-artifact-with-different-artifacts.script
deleted file mode 100755
index 57d408e3..00000000
--- a/tests.as-root/run-in-artifact-with-different-artifacts.script
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2012-2014 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 the 'run-in-artifact' command with different types of artifacts.
-
-set -eu
-
-. "$SRCDIR/tests.as-root/lib"
-
-# Build first image. Remember the stratum.
-"$SRCDIR/scripts/test-morph" build-morphology \
- test:morphs master linux-system
-
-system=$(find "$DATADIR/cache/artifacts" -maxdepth 1 -name '*.system.*-rootfs')
-chunk=$(find "$DATADIR/cache/artifacts" -maxdepth 1 -name '*.chunk.linux-misc')
-stratum=$(find "$DATADIR/cache/artifacts" -maxdepth 1 \
- -name '*.stratum.linux-stratum-runtime')
-
-# Run 'run-in-artifact' with the system artifact.
-echo "System:"
-"$SRCDIR/scripts/test-morph" run-in-artifact "$system" -- ls baserock/
-echo
-
-# Run 'run-in-artifact' with the chunk artifact.
-echo "Chunk:"
-"$SRCDIR/scripts/test-morph" run-in-artifact "$chunk" -- ls baserock/
-echo
-
-# Run 'run-in-artifact' with the statum artifact.
-echo "Stratum:"
-"$SRCDIR/scripts/test-morph" run-in-artifact "$stratum" -- ls baserock/ \
- 2>/dev/null || echo "Failed"
diff --git a/tests.as-root/run-in-artifact-with-different-artifacts.stdout b/tests.as-root/run-in-artifact-with-different-artifacts.stdout
deleted file mode 100644
index 7473990b..00000000
--- a/tests.as-root/run-in-artifact-with-different-artifacts.stdout
+++ /dev/null
@@ -1,32 +0,0 @@
-System:
-hello-bins.meta
-hello-devel.meta
-hello-doc.meta
-hello-libs.meta
-hello-locale.meta
-hello-misc.meta
-hello-stratum-devel.meta
-hello-stratum-runtime.meta
-linux-bins.meta
-linux-devel.meta
-linux-doc.meta
-linux-libs.meta
-linux-locale.meta
-linux-misc.meta
-linux-stratum-devel.meta
-linux-stratum-runtime.meta
-linux-system-rootfs.meta
-tools-bins.meta
-tools-devel.meta
-tools-doc.meta
-tools-libs.meta
-tools-locale.meta
-tools-misc.meta
-tools-stratum-devel.meta
-tools-stratum-runtime.meta
-
-Chunk:
-linux-misc.meta
-
-Stratum:
-Failed