summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2017-01-27 12:18:26 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-27 12:30:47 +0100
commit55686252cdf6b2bf8799ca1f0c7d66380eaea9b9 (patch)
tree6b1d280e6b543392bf73811d8318734359307df9 /bin
parentb0ab078f78601766f0a977c901593c31e58cb5c0 (diff)
downloadjenkins.debian.net-55686252cdf6b2bf8799ca1f0c7d66380eaea9b9.tar.xz
lvc: generally discard snapshots
Keeping them results in subsequent runs doing nothing much, which is a little confusing. We should instead separate jobs that start from the snapshots, and then pass the snapshots between jobs when they succeed, as this should make later tests more resilient to when the early part is failing and would prevent the later tests from running. Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lvc.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/bin/lvc.sh b/bin/lvc.sh
index f74ced03..310ef48f 100755
--- a/bin/lvc.sh
+++ b/bin/lvc.sh
@@ -142,24 +142,20 @@ else
fetch_if_newer "$INITRD" "$URL/$INITRD"
fi
-# discard any snapshots that are older than the inputs
-for dep in /srv/jenkins/cucumber /srv/jenkins/bin/lvc.sh /srv/jenkins/job-cfg/lvc.yaml $NETBOOT $PU_ISO ; do
- if [ -e "$dep" ] ; then
- LV_SNAP_DEPENDS="$LV_SNAP_DEPENDS $dep"
- fi
-done
-discard_snapshots $LIBVIRT_DOMAIN_NAME $LV_SNAP_DEPENDS
-
-# --keep-snapshots -- keeps the VM snapshots -- let's make life simple and not do that until we're using them to pass on state to the next jenkins job
+# discard any snapshots to ensure a clean run (we used to do this conditionally here, but that proved confusing)
+discard_snapshots $LIBVIRT_DOMAIN_NAME
echo "Debug log available at runtime at https://jenkins.debian.net/view/lvc/job/$JOB_NAME/ws/results/debug.log"
/srv/jenkins/cucumber/bin/run_test_suite --capture-all --keep-snapshots --vnc-server-only --iso $IMAGE --tmpdir $WORKSPACE --old-iso $IMAGE -- --format pretty --format pretty_debug --out $RESULTS/debug.log /srv/jenkins/cucumber/features/step_definitions /srv/jenkins/cucumber/features/support "${@}" || {
RETVAL=$?
+ # it may make sense to keep snapshots on failure, so subsequent tests are quicker -- only if we stop discarding them above though
discard_snapshots $LIBVIRT_DOMAIN_NAME
exit $RETVAL
}
+# FIXME -- decide here if we need to keep any snapshots, and put them somewhere safe for other jobs to find
+discard_snapshots $LIBVIRT_DOMAIN_NAME
cleanup_all
# don't cleanup twice