From bf2db6c02facc1ae7af660cb1542965ffd2c6663 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Sun, 5 Jun 2016 20:28:02 +0200 Subject: lvc; do not assume WORKSPACE == PWD Signed-off-by: Holger Levsen --- bin/lvc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/lvc.sh b/bin/lvc.sh index 8f0a3d6f..11de2685 100755 --- a/bin/lvc.sh +++ b/bin/lvc.sh @@ -14,7 +14,7 @@ URL=$1 ; shift cleanup_all() { find . -name \*.vlog.png -print0 | xargs -0 -r rm echo "Trying to preserve last screenshot…" - LAST_SCREENSHOT=$(ls -t1 results/*.png | head -1) + LAST_SCREENSHOT=$(ls -t1 $RESULTS/*.png | head -1) if [ -e "$LAST_SCREENSHOT" ] ; then cp $LAST_SCREENSHOT $WORKSPACE/screenshot.png convert $WORKSPACE/screenshot.png -adaptive-resize 128x96 $WORKSPACE/screenshot-thumb.png @@ -53,8 +53,6 @@ discard_snapshots() { # # define workspace + results # -rm -rf results screenshot.png screenshot-thumb.png - if [ -z "$WORKSPACE" ] ; then WORKSPACE=$PWD fi @@ -64,6 +62,8 @@ IMAGE=$WORKSPACE/$(basename $URL) LIBVIRT_DOMAIN_NAME="lvcVM-$EXECUTOR_NUMBER" +rm -rf $RESULTS $WORKSPACE/screenshot{,-thumb}.png + mkdir -p $RESULTS mkdir -p $WORKSPACE/DebianToasterStorage @@ -128,7 +128,7 @@ fi 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 $WORKSPACE/results/debug.log /srv/jenkins/cucumber/features/step_definitions /srv/jenkins/cucumber/features/support "${@}" || { +/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=$? discard_snapshots $LIBVIRT_DOMAIN_NAME exit $RETVAL -- cgit v1.2.3-70-g09d2