summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-06-05 20:28:02 +0200
committerHolger Levsen <holger@layer-acht.org>2016-06-05 22:13:46 +0200
commitbf2db6c02facc1ae7af660cb1542965ffd2c6663 (patch)
tree305a26c91431683928c5c472d5dbe37c05f41d54
parent549df025ad062d001700ae5f04bcd554bb4c0a82 (diff)
downloadjenkins.debian.net-bf2db6c02facc1ae7af660cb1542965ffd2c6663.tar.xz
lvc; do not assume WORKSPACE == PWD
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xbin/lvc.sh8
1 files changed, 4 insertions, 4 deletions
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