[Qa-jenkins-scm] [jenkins.debian.net] 02/04: combined diff with most of the cucmber changes, plus update_jdn stuff
Holger Levsen
holger at layer-acht.org
Wed May 11 19:56:06 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 88d376c9b7d2e52dee57fc67b2cbd07422a4e5bd
Author: Philip Hands <phil at hands.com>
Date: Wed May 11 17:22:32 2016 +0200
combined diff with most of the cucmber changes, plus update_jdn stuff
---
bin/lvc.sh | 100 +++++++++
cucumber/README-sikuli-cucumber | 34 +++
cucumber/bin/run_test_suite | 4 +-
.../features/images/DebianInstallerHttpProxy.png | Bin 485 -> 0 bytes
cucumber/features/images/d-i_GRUB_Debian.png | Bin 387 -> 0 bytes
cucumber/features/images/d-i_HttpProxy.png | Bin 5324 -> 0 bytes
cucumber/features/images/d-i_InstallGRUB.png | Bin 6367 -> 0 bytes
cucumber/features/images/d-i_gui_ArchiveMirror.png | Bin 0 -> 5265 bytes
.../features/images/d-i_gui_BritishEnglish.png | Bin 0 -> 3841 bytes
.../features/images/d-i_gui_CONTINUEselected.png | Bin 0 -> 3919 bytes
.../features/images/d-i_gui_CONTINUEunselected.png | Bin 0 -> 2814 bytes
.../features/images/d-i_gui_ChooseSoftware.png | Bin 0 -> 5924 bytes
cucumber/features/images/d-i_gui_Desktop+Gnome.png | Bin 0 -> 15335 bytes
.../features/images/d-i_gui_DesktopTask_No.png | Bin 0 -> 1322 bytes
.../features/images/d-i_gui_DesktopTask_Yes.png | Bin 0 -> 8920 bytes
cucumber/features/images/d-i_gui_DomainName.png | Bin 0 -> 2880 bytes
cucumber/features/images/d-i_gui_English.png | Bin 0 -> 2768 bytes
.../features/images/d-i_gui_EnterTheHostname.png | Bin 0 -> 7878 bytes
.../features/images/d-i_gui_FinishPartitioning.png | Bin 0 -> 14728 bytes
cucumber/features/images/d-i_gui_GRUBEnterDev.png | Bin 0 -> 19466 bytes
cucumber/features/images/d-i_gui_GRUBdev.png | Bin 0 -> 12068 bytes
cucumber/features/images/d-i_gui_HttpProxy.png | Bin 0 -> 5087 bytes
.../features/images/d-i_gui_InstallComplete.png | Bin 0 -> 9404 bytes
cucumber/features/images/d-i_gui_InstallGRUB.png | Bin 0 -> 15554 bytes
.../features/images/d-i_gui_InstallSoftware.png | Bin 0 -> 7357 bytes
.../images/d-i_gui_InstallingBaseSystem.png | Bin 0 -> 5818 bytes
.../images/d-i_gui_InstallingGRUBprogress.png | Bin 0 -> 8928 bytes
cucumber/features/images/d-i_gui_MirrorCountry.png | Bin 0 -> 8224 bytes
cucumber/features/images/d-i_gui_NameOfUser.png | Bin 0 -> 5622 bytes
cucumber/features/images/d-i_gui_No.png | Bin 0 -> 4330 bytes
.../features/images/d-i_gui_PartitioningMethod.png | Bin 0 -> 9878 bytes
.../features/images/d-i_gui_PartitioningScheme.png | Bin 0 -> 8981 bytes
cucumber/features/images/d-i_gui_RootPassword.png | Bin 0 -> 3650 bytes
cucumber/features/images/d-i_gui_ScanCD.png | Bin 0 -> 1779 bytes
.../images/d-i_gui_SelectDiskToPartition.png | Bin 0 -> 7584 bytes
.../features/images/d-i_gui_SelectYourLocation.png | Bin 0 -> 4229 bytes
cucumber/features/images/d-i_gui_UnitedKingdom.png | Bin 0 -> 4256 bytes
cucumber/features/images/d-i_gui_UseNetMirror.png | Bin 0 -> 1663 bytes
cucumber/features/images/d-i_gui_UserPassword.png | Bin 0 -> 7667 bytes
cucumber/features/images/d-i_gui_Yes.png | Bin 0 -> 4147 bytes
cucumber/features/images/d-i_gui_popcon.png | Bin 0 -> 13176 bytes
cucumber/features/images/d-i_popcon.png | Bin 3894 -> 0 bytes
...rchiveMirror.png => d-i_text_ArchiveMirror.png} | Bin
...ngEnglishUK.png => d-i_text_BritishEnglish.png} | Bin
...oseSoftware.png => d-i_text_ChooseSoftware.png} | Bin
.../features/images/d-i_text_Desktop+Gnome.png | Bin 0 -> 5135 bytes
...ktopTask_No.png => d-i_text_DesktopTask_No.png} | Bin
...opTask_Yes.png => d-i_text_DesktopTask_Yes.png} | Bin
...lerDomainPrompt.png => d-i_text_DomainName.png} | Bin
...rSelectLangEnglish.png => d-i_text_English.png} | Bin
...amePrompt.png => d-i_text_EnterTheHostname.png} | Bin
...-i_F12BootMenu.png => d-i_text_F12BootMenu.png} | Bin
...tioning.png => d-i_text_FinishPartitioning.png} | Bin
..._GRUBEnterDev.png => d-i_text_GRUBEnterDev.png} | Bin
.../{d-i_GRUBdev.png => d-i_text_GRUBdev.png} | Bin
cucumber/features/images/d-i_text_HttpProxy.png | Bin 0 -> 5346 bytes
...llComplete.png => d-i_text_InstallComplete.png} | Bin
cucumber/features/images/d-i_text_InstallGRUB.png | Bin 0 -> 3221 bytes
.../features/images/d-i_text_InstallSoftware.png | Bin 0 -> 9341 bytes
...ystem.png => d-i_text_InstallingBaseSystem.png} | Bin
.../images/d-i_text_InstallingGRUBprogress.png | Bin 0 -> 10406 bytes
...irrorCountry.png => d-i_text_MirrorCountry.png} | Bin
...allerNameOfUser.png => d-i_text_NameOfUser.png} | Bin
.../images/{d-i_No.png => d-i_text_No.png} | Bin
...lerNoDiskFound.png => d-i_text_NoDiskFound.png} | Bin
...gMethod.png => d-i_text_PartitioningMethod.png} | Bin
...gScheme.png => d-i_text_PartitioningScheme.png} | Bin
...rRootPassword.png => d-i_text_RootPassword.png} | Bin
.../images/{d-i_ScanCD.png => d-i_text_ScanCD.png} | Bin
...electBootDev.png => d-i_text_SelectBootDev.png} | Bin
...tion.png => d-i_text_SelectDiskToPartition.png} | Bin
...lection.png => d-i_text_SelectYourLocation.png} | Bin
.../features/images/d-i_text_UnitedKingdom.png | Bin 0 -> 4162 bytes
..._UseNetMirror.png => d-i_text_UseNetMirror.png} | Bin
...rUserPassword.png => d-i_text_UserPassword.png} | Bin
.../images/{d-i_Yes.png => d-i_text_Yes.png} | Bin
.../images/d-i_text_bootmenu_graphical.png | Bin 0 -> 15704 bytes
cucumber/features/images/d-i_text_popcon.png | Bin 0 -> 10013 bytes
cucumber/features/install.feature | 27 ++-
cucumber/features/scripts/vm-execute | 4 +-
cucumber/features/step_definitions/common_steps.rb | 241 ++++++++++++++------
cucumber/features/step_definitions/snapshots.rb | 242 +++++++--------------
cucumber/features/support/config.rb | 18 +-
cucumber/features/support/env.rb | 2 +-
hosts/jenkins-test-vm/job-cfg/lvc.yaml | 1 +
hosts/jenkins/job-cfg | 1 +
job-cfg/lvc.yaml | 57 ++---
update_jdn.sh | 26 +--
88 files changed, 451 insertions(+), 306 deletions(-)
diff --git a/bin/lvc.sh b/bin/lvc.sh
new file mode 100755
index 0000000..9c54a9c
--- /dev/null
+++ b/bin/lvc.sh
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+# Copyright 2012-2015 Holger Levsen <holger at layer-acht.org>
+# Copyright 2016 Philip Hands <phil at hands.com>
+# released under the GPLv=2
+
+DEBUG=false
+. /srv/jenkins/bin/common-functions.sh
+common_init "$@"
+
+# $1 = wget url/jigdo url
+URL=$1 ; shift
+
+IMAGE=$PWD/$(basename $URL)
+
+cleanup_all() {
+ find . -name \*.vlog.png -print0 | xargs -0 -r rm
+}
+
+fetch_if_newer() {
+ url="$2"
+ file="$1"
+ echo "Downloading $url"
+ curlopts="-L -s -S"
+ if [ -f "$file" ] ; then
+ ls -l $file
+ echo "File exists, will only re-download if a newer one is available..."
+ curlopts="$curlopts -z $file"
+ fi
+ curl $curlopts -o $file $url
+}
+
+#
+# define workspace + results
+#
+rm -rf results screenshot.png screenshot-thumb.png
+mkdir -p results
+if [ -z "$WORKSPACE" ] ; then
+ WORKSPACE=$PWD
+fi
+RESULTS=$WORKSPACE/results
+mkdir -p $RESULTS
+
+trap cleanup_all INT TERM EXIT
+
+#
+# install image preparation
+#
+if [ ! -z "$NETBOOT" ] ; then
+ #
+ # if there is a netboot installer tarball...
+ #
+ fetch_if_newer "$NETBOOT" "$URL"
+ sha256sum "$NETBOOT"
+ # try to extract, otherwise clean up and abort
+ if ! tar -zxvf "$NETBOOT" ; then
+ echo "tarball seems corrupt; deleting it"
+ rm -f "$NETBOOT"
+ exit 1
+ fi
+elif [ ! -z "$IMAGE" ] ; then
+ #
+ # if there is a CD image...
+ #
+ fetch_if_newer "$IMAGE" "$URL"
+ # is this really an .iso?
+ if [ $(file "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then
+ # yes, so let's md5sum and mount it
+ md5sum $IMAGE
+# sudo mkdir -p $IMAGE_MNT
+# grep -q $IMAGE_MNT /proc/mounts && sudo umount -l $IMAGE_MNT
+# sleep 1
+# sudo mount -o loop,ro $IMAGE $IMAGE_MNT
+ else
+ # something went wrong
+ figlet "no .iso"
+ echo "ERROR: no valid .iso found"
+ if [ $(file "$IMAGE" | grep -c "HTML document") -eq 1 ] ; then
+ mv "$IMAGE" "$IMAGE.html"
+ lynx --dump "$IMAGE.html"
+ rm "$IMAGE.html"
+ fi
+ exit 1
+ fi
+else
+ #
+ # else netboot gtk
+ #
+ fetch_if_newer "$KERNEL" "$URL/$KERNEL"
+ fetch_if_newer "$INITRD" "$URL/$INITRD"
+fi
+
+/srv/jenkins/cucumber/bin/run_test_suite --vnc-server-only --capture-all --keep-snapshots --iso $IMAGE --tmpdir $PWD --old-iso $IMAGE -- --format pretty --format pretty_debug --out $PWD/results/debug.log /srv/jenkins/cucumber/features/step_definitions /srv/jenkins/cucumber/features/support "${@}"
+
+cp $(ls -t1 results/*.png | head -1) $WORKSPACE/screenshot.png
+
+cleanup_all
+
+# don't cleanup twice
+trap - INT TERM EXIT
diff --git a/cucumber/README-sikuli-cucumber b/cucumber/README-sikuli-cucumber
index 24d90aa..34430c5 100644
--- a/cucumber/README-sikuli-cucumber
+++ b/cucumber/README-sikuli-cucumber
@@ -11,3 +11,37 @@ FIXME - I added a git repo to:
/var/lib/jenkins/workspace/lvc_debian-installer_jessie_standard_apt
in order to shut-up Tail's script that looks for git repos to populate some variables -- need to strip that out, or make it overridable.
+
+
+FIXME - we don't need the OLD_ISO stuff -- make it so that it still works when not specified, so we can push the change upwards
+
+
+FIXME - we need to be able to run multiple VMs in parallel, and so multiple jobs
+
+FIXME - the VM's network currnetly needs to be started by hand
+
+FIXME - snapshots get destroyed if one clears the workspace, but virsh remembers them -- we need to either move them or know how to delete them with e.g: virsh snapshot-delete DebianToaster debian-gui-minimal-install
+
+
+Workflow:
+
+ update in local git, then run lvc-kick (FIXME add lvc-kick to git)
+ use the web interface to build the job (FIXME see if we can nudge the job from lvc-kick)
+
+ ssh -Y -C -L 5900:localhost:5900 jekinstest
+
+ Then we can look at the install (if the --vnc-server-only option has been passed to cucumber ... see bin/lvc.sh) with this:
+
+ xvncviewer -ViewOnly localhost:0
+
+ (you should make sure to use -ViewOnly, since any mouse movement can affect the ability of Sikuli to recognise things on the screen)
+
+ (run from the local system, which gets forwarded via the ssh connection)
+
+ When the install fails, you should get a screenshot of the last moment -- that can be grabbed and cut down for the next match)
+
+ It seems that including a colour transition, such as the edge of a frame, in the thing you're looking for makes life easier for sikuli to find it, but may make it more fragile, we'll see)
+
+ At present, sadly the tesseract OCR stuff spews vast numbers of vlog messages, making it unusable -- this has been fixed upstream (in sikuli IIRC, or maybe cucumber -- something that's now version 1.x but which has not yet hit Debian ... we can use that once it's packaged)
+
+
diff --git a/cucumber/bin/run_test_suite b/cucumber/bin/run_test_suite
index 5b40c38..86e7ea7 100755
--- a/cucumber/bin/run_test_suite
+++ b/cucumber/bin/run_test_suite
@@ -262,9 +262,9 @@ if [ -n "${VNC_VIEWER:-}" ]; then
fi
export SIKULI_HOME="/usr/share/java"
-export SIKULI_IMAGE_PATH="/srv/jenkins/features/images/"
+export SIKULI_IMAGE_PATH="/srv/jenkins/cucumber/features/images/"
export RUBYLIB="/srv/jenkins"
-export VM_XML_PATH="/srv/jenkins/features/domains"
+export VM_XML_PATH="/srv/jenkins/cucumber/features/domains"
export DISPLAY=${TARGET_DISPLAY}
check_dependencies cucumber
diff --git a/cucumber/features/images/DebianInstallerHttpProxy.png b/cucumber/features/images/DebianInstallerHttpProxy.png
deleted file mode 100644
index 04b3e13..0000000
Binary files a/cucumber/features/images/DebianInstallerHttpProxy.png and /dev/null differ
diff --git a/cucumber/features/images/d-i_GRUB_Debian.png b/cucumber/features/images/d-i_GRUB_Debian.png
deleted file mode 100644
index 3b67cfb..0000000
Binary files a/cucumber/features/images/d-i_GRUB_Debian.png and /dev/null differ
diff --git a/cucumber/features/images/d-i_HttpProxy.png b/cucumber/features/images/d-i_HttpProxy.png
deleted file mode 100644
index 4163a5b..0000000
Binary files a/cucumber/features/images/d-i_HttpProxy.png and /dev/null differ
diff --git a/cucumber/features/images/d-i_InstallGRUB.png b/cucumber/features/images/d-i_InstallGRUB.png
deleted file mode 100644
index e491fbd..0000000
Binary files a/cucumber/features/images/d-i_InstallGRUB.png and /dev/null differ
diff --git a/cucumber/features/images/d-i_gui_ArchiveMirror.png b/cucumber/features/images/d-i_gui_ArchiveMirror.png
new file mode 100644
index 0000000..d965843
Binary files /dev/null and b/cucumber/features/images/d-i_gui_ArchiveMirror.png differ
diff --git a/cucumber/features/images/d-i_gui_BritishEnglish.png b/cucumber/features/images/d-i_gui_BritishEnglish.png
new file mode 100644
index 0000000..466fbec
Binary files /dev/null and b/cucumber/features/images/d-i_gui_BritishEnglish.png differ
diff --git a/cucumber/features/images/d-i_gui_CONTINUEselected.png b/cucumber/features/images/d-i_gui_CONTINUEselected.png
new file mode 100644
index 0000000..436eeb6
Binary files /dev/null and b/cucumber/features/images/d-i_gui_CONTINUEselected.png differ
diff --git a/cucumber/features/images/d-i_gui_CONTINUEunselected.png b/cucumber/features/images/d-i_gui_CONTINUEunselected.png
new file mode 100644
index 0000000..be82588
Binary files /dev/null and b/cucumber/features/images/d-i_gui_CONTINUEunselected.png differ
diff --git a/cucumber/features/images/d-i_gui_ChooseSoftware.png b/cucumber/features/images/d-i_gui_ChooseSoftware.png
new file mode 100644
index 0000000..c34906c
Binary files /dev/null and b/cucumber/features/images/d-i_gui_ChooseSoftware.png differ
diff --git a/cucumber/features/images/d-i_gui_Desktop+Gnome.png b/cucumber/features/images/d-i_gui_Desktop+Gnome.png
new file mode 100644
index 0000000..3d34917
Binary files /dev/null and b/cucumber/features/images/d-i_gui_Desktop+Gnome.png differ
diff --git a/cucumber/features/images/d-i_gui_DesktopTask_No.png b/cucumber/features/images/d-i_gui_DesktopTask_No.png
new file mode 100644
index 0000000..7e2cbc2
Binary files /dev/null and b/cucumber/features/images/d-i_gui_DesktopTask_No.png differ
diff --git a/cucumber/features/images/d-i_gui_DesktopTask_Yes.png b/cucumber/features/images/d-i_gui_DesktopTask_Yes.png
new file mode 100644
index 0000000..c92a8f6
Binary files /dev/null and b/cucumber/features/images/d-i_gui_DesktopTask_Yes.png differ
diff --git a/cucumber/features/images/d-i_gui_DomainName.png b/cucumber/features/images/d-i_gui_DomainName.png
new file mode 100644
index 0000000..045ab5a
Binary files /dev/null and b/cucumber/features/images/d-i_gui_DomainName.png differ
diff --git a/cucumber/features/images/d-i_gui_English.png b/cucumber/features/images/d-i_gui_English.png
new file mode 100644
index 0000000..4aadb34
Binary files /dev/null and b/cucumber/features/images/d-i_gui_English.png differ
diff --git a/cucumber/features/images/d-i_gui_EnterTheHostname.png b/cucumber/features/images/d-i_gui_EnterTheHostname.png
new file mode 100644
index 0000000..c3c9b7d
Binary files /dev/null and b/cucumber/features/images/d-i_gui_EnterTheHostname.png differ
diff --git a/cucumber/features/images/d-i_gui_FinishPartitioning.png b/cucumber/features/images/d-i_gui_FinishPartitioning.png
new file mode 100644
index 0000000..2d72176
Binary files /dev/null and b/cucumber/features/images/d-i_gui_FinishPartitioning.png differ
diff --git a/cucumber/features/images/d-i_gui_GRUBEnterDev.png b/cucumber/features/images/d-i_gui_GRUBEnterDev.png
new file mode 100644
index 0000000..05ec9e8
Binary files /dev/null and b/cucumber/features/images/d-i_gui_GRUBEnterDev.png differ
diff --git a/cucumber/features/images/d-i_gui_GRUBdev.png b/cucumber/features/images/d-i_gui_GRUBdev.png
new file mode 100644
index 0000000..2e96df0
Binary files /dev/null and b/cucumber/features/images/d-i_gui_GRUBdev.png differ
diff --git a/cucumber/features/images/d-i_gui_HttpProxy.png b/cucumber/features/images/d-i_gui_HttpProxy.png
new file mode 100644
index 0000000..bed3ade
Binary files /dev/null and b/cucumber/features/images/d-i_gui_HttpProxy.png differ
diff --git a/cucumber/features/images/d-i_gui_InstallComplete.png b/cucumber/features/images/d-i_gui_InstallComplete.png
new file mode 100644
index 0000000..c38b9cb
Binary files /dev/null and b/cucumber/features/images/d-i_gui_InstallComplete.png differ
diff --git a/cucumber/features/images/d-i_gui_InstallGRUB.png b/cucumber/features/images/d-i_gui_InstallGRUB.png
new file mode 100644
index 0000000..63332a5
Binary files /dev/null and b/cucumber/features/images/d-i_gui_InstallGRUB.png differ
diff --git a/cucumber/features/images/d-i_gui_InstallSoftware.png b/cucumber/features/images/d-i_gui_InstallSoftware.png
new file mode 100644
index 0000000..a2551fc
Binary files /dev/null and b/cucumber/features/images/d-i_gui_InstallSoftware.png differ
diff --git a/cucumber/features/images/d-i_gui_InstallingBaseSystem.png b/cucumber/features/images/d-i_gui_InstallingBaseSystem.png
new file mode 100644
index 0000000..90147be
Binary files /dev/null and b/cucumber/features/images/d-i_gui_InstallingBaseSystem.png differ
diff --git a/cucumber/features/images/d-i_gui_InstallingGRUBprogress.png b/cucumber/features/images/d-i_gui_InstallingGRUBprogress.png
new file mode 100644
index 0000000..4bbec3c
Binary files /dev/null and b/cucumber/features/images/d-i_gui_InstallingGRUBprogress.png differ
diff --git a/cucumber/features/images/d-i_gui_MirrorCountry.png b/cucumber/features/images/d-i_gui_MirrorCountry.png
new file mode 100644
index 0000000..ef5fe2a
Binary files /dev/null and b/cucumber/features/images/d-i_gui_MirrorCountry.png differ
diff --git a/cucumber/features/images/d-i_gui_NameOfUser.png b/cucumber/features/images/d-i_gui_NameOfUser.png
new file mode 100644
index 0000000..bbe538f
Binary files /dev/null and b/cucumber/features/images/d-i_gui_NameOfUser.png differ
diff --git a/cucumber/features/images/d-i_gui_No.png b/cucumber/features/images/d-i_gui_No.png
new file mode 100644
index 0000000..7bca8a1
Binary files /dev/null and b/cucumber/features/images/d-i_gui_No.png differ
diff --git a/cucumber/features/images/d-i_gui_PartitioningMethod.png b/cucumber/features/images/d-i_gui_PartitioningMethod.png
new file mode 100644
index 0000000..cb668f1
Binary files /dev/null and b/cucumber/features/images/d-i_gui_PartitioningMethod.png differ
diff --git a/cucumber/features/images/d-i_gui_PartitioningScheme.png b/cucumber/features/images/d-i_gui_PartitioningScheme.png
new file mode 100644
index 0000000..7d3acf9
Binary files /dev/null and b/cucumber/features/images/d-i_gui_PartitioningScheme.png differ
diff --git a/cucumber/features/images/d-i_gui_RootPassword.png b/cucumber/features/images/d-i_gui_RootPassword.png
new file mode 100644
index 0000000..58a4a66
Binary files /dev/null and b/cucumber/features/images/d-i_gui_RootPassword.png differ
diff --git a/cucumber/features/images/d-i_gui_ScanCD.png b/cucumber/features/images/d-i_gui_ScanCD.png
new file mode 100644
index 0000000..43ff764
Binary files /dev/null and b/cucumber/features/images/d-i_gui_ScanCD.png differ
diff --git a/cucumber/features/images/d-i_gui_SelectDiskToPartition.png b/cucumber/features/images/d-i_gui_SelectDiskToPartition.png
new file mode 100644
index 0000000..f5c045c
Binary files /dev/null and b/cucumber/features/images/d-i_gui_SelectDiskToPartition.png differ
diff --git a/cucumber/features/images/d-i_gui_SelectYourLocation.png b/cucumber/features/images/d-i_gui_SelectYourLocation.png
new file mode 100644
index 0000000..b253eb1
Binary files /dev/null and b/cucumber/features/images/d-i_gui_SelectYourLocation.png differ
diff --git a/cucumber/features/images/d-i_gui_UnitedKingdom.png b/cucumber/features/images/d-i_gui_UnitedKingdom.png
new file mode 100644
index 0000000..c3cc54e
Binary files /dev/null and b/cucumber/features/images/d-i_gui_UnitedKingdom.png differ
diff --git a/cucumber/features/images/d-i_gui_UseNetMirror.png b/cucumber/features/images/d-i_gui_UseNetMirror.png
new file mode 100644
index 0000000..58dd466
Binary files /dev/null and b/cucumber/features/images/d-i_gui_UseNetMirror.png differ
diff --git a/cucumber/features/images/d-i_gui_UserPassword.png b/cucumber/features/images/d-i_gui_UserPassword.png
new file mode 100644
index 0000000..6be3491
Binary files /dev/null and b/cucumber/features/images/d-i_gui_UserPassword.png differ
diff --git a/cucumber/features/images/d-i_gui_Yes.png b/cucumber/features/images/d-i_gui_Yes.png
new file mode 100644
index 0000000..2c84ad2
Binary files /dev/null and b/cucumber/features/images/d-i_gui_Yes.png differ
diff --git a/cucumber/features/images/d-i_gui_popcon.png b/cucumber/features/images/d-i_gui_popcon.png
new file mode 100644
index 0000000..7eb0fe2
Binary files /dev/null and b/cucumber/features/images/d-i_gui_popcon.png differ
diff --git a/cucumber/features/images/d-i_popcon.png b/cucumber/features/images/d-i_popcon.png
deleted file mode 100644
index ed0ba61..0000000
Binary files a/cucumber/features/images/d-i_popcon.png and /dev/null differ
diff --git a/cucumber/features/images/d-i_ArchiveMirror.png b/cucumber/features/images/d-i_text_ArchiveMirror.png
similarity index 100%
rename from cucumber/features/images/d-i_ArchiveMirror.png
rename to cucumber/features/images/d-i_text_ArchiveMirror.png
diff --git a/cucumber/features/images/DebianInstallerSelectLangEnglishUK.png b/cucumber/features/images/d-i_text_BritishEnglish.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerSelectLangEnglishUK.png
rename to cucumber/features/images/d-i_text_BritishEnglish.png
diff --git a/cucumber/features/images/d-i_ChooseSoftware.png b/cucumber/features/images/d-i_text_ChooseSoftware.png
similarity index 100%
rename from cucumber/features/images/d-i_ChooseSoftware.png
rename to cucumber/features/images/d-i_text_ChooseSoftware.png
diff --git a/cucumber/features/images/d-i_text_Desktop+Gnome.png b/cucumber/features/images/d-i_text_Desktop+Gnome.png
new file mode 100644
index 0000000..476c8ab
Binary files /dev/null and b/cucumber/features/images/d-i_text_Desktop+Gnome.png differ
diff --git a/cucumber/features/images/d-i_DesktopTask_No.png b/cucumber/features/images/d-i_text_DesktopTask_No.png
similarity index 100%
rename from cucumber/features/images/d-i_DesktopTask_No.png
rename to cucumber/features/images/d-i_text_DesktopTask_No.png
diff --git a/cucumber/features/images/d-i_DesktopTask_Yes.png b/cucumber/features/images/d-i_text_DesktopTask_Yes.png
similarity index 100%
rename from cucumber/features/images/d-i_DesktopTask_Yes.png
rename to cucumber/features/images/d-i_text_DesktopTask_Yes.png
diff --git a/cucumber/features/images/DebianInstallerDomainPrompt.png b/cucumber/features/images/d-i_text_DomainName.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerDomainPrompt.png
rename to cucumber/features/images/d-i_text_DomainName.png
diff --git a/cucumber/features/images/DebianInstallerSelectLangEnglish.png b/cucumber/features/images/d-i_text_English.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerSelectLangEnglish.png
rename to cucumber/features/images/d-i_text_English.png
diff --git a/cucumber/features/images/DebianInstallerHostnamePrompt.png b/cucumber/features/images/d-i_text_EnterTheHostname.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerHostnamePrompt.png
rename to cucumber/features/images/d-i_text_EnterTheHostname.png
diff --git a/cucumber/features/images/d-i_F12BootMenu.png b/cucumber/features/images/d-i_text_F12BootMenu.png
similarity index 100%
rename from cucumber/features/images/d-i_F12BootMenu.png
rename to cucumber/features/images/d-i_text_F12BootMenu.png
diff --git a/cucumber/features/images/d-i_FinishPartitioning.png b/cucumber/features/images/d-i_text_FinishPartitioning.png
similarity index 100%
rename from cucumber/features/images/d-i_FinishPartitioning.png
rename to cucumber/features/images/d-i_text_FinishPartitioning.png
diff --git a/cucumber/features/images/d-i_GRUBEnterDev.png b/cucumber/features/images/d-i_text_GRUBEnterDev.png
similarity index 100%
rename from cucumber/features/images/d-i_GRUBEnterDev.png
rename to cucumber/features/images/d-i_text_GRUBEnterDev.png
diff --git a/cucumber/features/images/d-i_GRUBdev.png b/cucumber/features/images/d-i_text_GRUBdev.png
similarity index 100%
rename from cucumber/features/images/d-i_GRUBdev.png
rename to cucumber/features/images/d-i_text_GRUBdev.png
diff --git a/cucumber/features/images/d-i_text_HttpProxy.png b/cucumber/features/images/d-i_text_HttpProxy.png
new file mode 100644
index 0000000..5b1d004
Binary files /dev/null and b/cucumber/features/images/d-i_text_HttpProxy.png differ
diff --git a/cucumber/features/images/d-i_InstallComplete.png b/cucumber/features/images/d-i_text_InstallComplete.png
similarity index 100%
rename from cucumber/features/images/d-i_InstallComplete.png
rename to cucumber/features/images/d-i_text_InstallComplete.png
diff --git a/cucumber/features/images/d-i_text_InstallGRUB.png b/cucumber/features/images/d-i_text_InstallGRUB.png
new file mode 100644
index 0000000..80c5302
Binary files /dev/null and b/cucumber/features/images/d-i_text_InstallGRUB.png differ
diff --git a/cucumber/features/images/d-i_text_InstallSoftware.png b/cucumber/features/images/d-i_text_InstallSoftware.png
new file mode 100644
index 0000000..b03e369
Binary files /dev/null and b/cucumber/features/images/d-i_text_InstallSoftware.png differ
diff --git a/cucumber/features/images/DebianInstallerInstallingBaseSystem.png b/cucumber/features/images/d-i_text_InstallingBaseSystem.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerInstallingBaseSystem.png
rename to cucumber/features/images/d-i_text_InstallingBaseSystem.png
diff --git a/cucumber/features/images/d-i_text_InstallingGRUBprogress.png b/cucumber/features/images/d-i_text_InstallingGRUBprogress.png
new file mode 100644
index 0000000..4cae154
Binary files /dev/null and b/cucumber/features/images/d-i_text_InstallingGRUBprogress.png differ
diff --git a/cucumber/features/images/DebianInstallerMirrorCountry.png b/cucumber/features/images/d-i_text_MirrorCountry.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerMirrorCountry.png
rename to cucumber/features/images/d-i_text_MirrorCountry.png
diff --git a/cucumber/features/images/DebianInstallerNameOfUser.png b/cucumber/features/images/d-i_text_NameOfUser.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerNameOfUser.png
rename to cucumber/features/images/d-i_text_NameOfUser.png
diff --git a/cucumber/features/images/d-i_No.png b/cucumber/features/images/d-i_text_No.png
similarity index 100%
rename from cucumber/features/images/d-i_No.png
rename to cucumber/features/images/d-i_text_No.png
diff --git a/cucumber/features/images/DebianInstallerNoDiskFound.png b/cucumber/features/images/d-i_text_NoDiskFound.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerNoDiskFound.png
rename to cucumber/features/images/d-i_text_NoDiskFound.png
diff --git a/cucumber/features/images/DebianInstallerPartitioningMethod.png b/cucumber/features/images/d-i_text_PartitioningMethod.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerPartitioningMethod.png
rename to cucumber/features/images/d-i_text_PartitioningMethod.png
diff --git a/cucumber/features/images/DebianInstallerPartitioningScheme.png b/cucumber/features/images/d-i_text_PartitioningScheme.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerPartitioningScheme.png
rename to cucumber/features/images/d-i_text_PartitioningScheme.png
diff --git a/cucumber/features/images/DebianInstallerRootPassword.png b/cucumber/features/images/d-i_text_RootPassword.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerRootPassword.png
rename to cucumber/features/images/d-i_text_RootPassword.png
diff --git a/cucumber/features/images/d-i_ScanCD.png b/cucumber/features/images/d-i_text_ScanCD.png
similarity index 100%
rename from cucumber/features/images/d-i_ScanCD.png
rename to cucumber/features/images/d-i_text_ScanCD.png
diff --git a/cucumber/features/images/d-i_SelectBootDev.png b/cucumber/features/images/d-i_text_SelectBootDev.png
similarity index 100%
rename from cucumber/features/images/d-i_SelectBootDev.png
rename to cucumber/features/images/d-i_text_SelectBootDev.png
diff --git a/cucumber/features/images/DebianInstallerSelectDiskToPartition.png b/cucumber/features/images/d-i_text_SelectDiskToPartition.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerSelectDiskToPartition.png
rename to cucumber/features/images/d-i_text_SelectDiskToPartition.png
diff --git a/cucumber/features/images/DebianInstallerCountrySelection.png b/cucumber/features/images/d-i_text_SelectYourLocation.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerCountrySelection.png
rename to cucumber/features/images/d-i_text_SelectYourLocation.png
diff --git a/cucumber/features/images/d-i_text_UnitedKingdom.png b/cucumber/features/images/d-i_text_UnitedKingdom.png
new file mode 100644
index 0000000..279d2cf
Binary files /dev/null and b/cucumber/features/images/d-i_text_UnitedKingdom.png differ
diff --git a/cucumber/features/images/d-i_UseNetMirror.png b/cucumber/features/images/d-i_text_UseNetMirror.png
similarity index 100%
rename from cucumber/features/images/d-i_UseNetMirror.png
rename to cucumber/features/images/d-i_text_UseNetMirror.png
diff --git a/cucumber/features/images/DebianInstallerUserPassword.png b/cucumber/features/images/d-i_text_UserPassword.png
similarity index 100%
rename from cucumber/features/images/DebianInstallerUserPassword.png
rename to cucumber/features/images/d-i_text_UserPassword.png
diff --git a/cucumber/features/images/d-i_Yes.png b/cucumber/features/images/d-i_text_Yes.png
similarity index 100%
rename from cucumber/features/images/d-i_Yes.png
rename to cucumber/features/images/d-i_text_Yes.png
diff --git a/cucumber/features/images/d-i_text_bootmenu_graphical.png b/cucumber/features/images/d-i_text_bootmenu_graphical.png
new file mode 100644
index 0000000..f1c116a
Binary files /dev/null and b/cucumber/features/images/d-i_text_bootmenu_graphical.png differ
diff --git a/cucumber/features/images/d-i_text_popcon.png b/cucumber/features/images/d-i_text_popcon.png
new file mode 100644
index 0000000..487457c
Binary files /dev/null and b/cucumber/features/images/d-i_text_popcon.png differ
diff --git a/cucumber/features/install.feature b/cucumber/features/install.feature
index 3b71b6c..8540687 100644
--- a/cucumber/features/install.feature
+++ b/cucumber/features/install.feature
@@ -1,14 +1,23 @@
@product
-Feature: Doing a trivial d-i install
+Feature: Doing variations on d-i installs
As a normal user
- I should be able to do a text-mode install
+ I should be able to install Debian
- Scenario Outline: Install Debian and boot to login prompt
- Given I have installed <type> Debian
- And I start the computer
- Then I wait for a Login Prompt
+ Scenario Outline: Install Debian, and boot to a login prompt
+ Given I install a <target_ui> Debian system, in <install_ui> mode
+ When I start the computer
+ Then I should see a Login prompt
Examples:
- | type |
- | Minimal |
- | Gnome Desktop |
+ | install_ui | target_ui |
+ | gui | Minimal |
+ | gui | non-GUI |
+ | gui | Gnome Desktop |
+ | text | Minimal |
+ | text | non-GUI |
+ | text | Gnome Desktop |
+
+# Scenario: Get a useful error from a bogus HTTP proxy
+# Given I get d-i to the HTTP proxy prompt
+# When I set the proxy to "172.23.23.23"
+# Then I should get an error message that mentions the proxy
diff --git a/cucumber/features/scripts/vm-execute b/cucumber/features/scripts/vm-execute
index fc1bf45..c208217 100755
--- a/cucumber/features/scripts/vm-execute
+++ b/cucumber/features/scripts/vm-execute
@@ -2,7 +2,7 @@
require 'optparse'
begin
- require "#{`git rev-parse --show-toplevel`.chomp}/features/support/helpers/exec_helper.rb"
+ require "#{`git rev-parse --show-toplevel`.chomp}/cucumber/features/support/helpers/exec_helper.rb"
rescue LoadError => e
raise "This script must be run from within Tails' Git directory."
end
@@ -22,7 +22,7 @@ cmd_opts = {
}
opt_parser = OptionParser.new do |opts|
- opts.banner = "Usage: features/scripts/vm-execute [opts] COMMAND"
+ opts.banner = "Usage: cucumber/features/scripts/vm-execute [opts] COMMAND"
opts.separator ""
opts.separator "Runs commands in the VM guest being tested. This script " \
"must be run from within Tails' Git directory."
diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb
index bd03ceb..69fd238 100644
--- a/cucumber/features/step_definitions/common_steps.rb
+++ b/cucumber/features/step_definitions/common_steps.rb
@@ -91,7 +91,9 @@ def robust_notification_wait(notification_image, time_to_wait)
end
def post_snapshot_restore_hook
- $vm.wait_until_remote_shell_is_up
+ # FIXME -- we've got a brain-damaged version of this, unlike Tails, so it breaks after restores at present
+ # that being the case, let's not worry until we actually miss the feature
+ #$vm.wait_until_remote_shell_is_up
post_vm_start_hook
# XXX-9p: See XXX-9p above
@@ -122,6 +124,10 @@ def post_snapshot_restore_hook
#end
end
+def diui_png(name,ui_mode)
+ return "d-i_" + ui_mode + "_" + name + ".png"
+end
+
Given /^a computer$/ do
$vm.destroy_and_undefine if $vm
$vm = VM.new($virt, VM_XML_PATH, $vmnet, $vmstorage, DISPLAY)
@@ -257,136 +263,243 @@ When /^I destroy the computer$/ do
$vm.destroy_and_undefine
end
-Given /^the computer (re)?boots DebianInstaller(|\d+)$/ do |reboot,version|
+Given /^I boot the computer, and select ([a-z]*) mode$/ do |ui_mode|
boot_timeout = 30
- # We need some extra time for memory wiping if rebooting
@screen.wait("d-i8_bootsplash.png", boot_timeout)
- @screen.type(Sikuli::Key.TAB)
- @screen.type(' preseed/early_command="echo ttyS0::askfirst:-/bin/sh>>/etc/inittab;kill -HUP 1"' + " blacklist=psmouse #{@boot_options}" +
+ if "gui" == ui_mode
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.wait("d-i_bootmenu_graphical.png", 10)
+ end
+
+ @screen.type(Sikuli::Key.TAB)
+ @screen.type(' preseed/early_command="echo DPMS=-s\\\\ 0 > /lib/debian-installer.d/S61Xnoblank ; echo ttyS0::askfirst:-/bin/sh>>/etc/inittab;kill -HUP 1"' + " blacklist=psmouse #{@boot_options}" +
Sikuli::Key.ENTER)
$vm.wait_until_remote_shell_is_up
end
-Given /^I select British English$/ do
- @screen.wait("DebianInstallerSelectLangEnglish.png", 30)
+Given /^in ([a-z]*) mode I select British English$/ do |ui_mode|
+ @screen.wait(diui_png("English",ui_mode), 30)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("DebianInstallerCountrySelection.png", 10)
+ @screen.wait(diui_png("SelectYourLocation",ui_mode), 10)
@screen.type(Sikuli::Key.UP)
- @screen.waitVanish("DebianInstallerCountrySelection.png", 10)
+ @screen.wait(diui_png("UnitedKingdom",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("DebianInstallerSelectLangEnglishUK.png", 10)
+ @screen.wait(diui_png("BritishEnglish",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
end
-Given /^I accept the hostname, using "([^"]*)" as the domain$/ do |domain|
- @screen.wait("DebianInstallerHostnamePrompt.png", 5*60)
+Given /^in ([a-z]*) mode I accept the hostname, using "([^"]*)" as the domain$/ do |ui_mode,domain|
+ @screen.wait(diui_png("EnterTheHostname",ui_mode), 5*60)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("DebianInstallerDomainPrompt.png", 10)
+ @screen.wait(diui_png("DomainName",ui_mode), 10)
@screen.type(domain + Sikuli::Key.ENTER)
- @screen.waitVanish("DebianInstallerDomainPrompt.png", 10)
+ @screen.waitVanish(diui_png("DomainName",ui_mode), 10)
end
-Given /^I set the root password to "([^"]*)"$/ do |rootpw|
+Given /^in ([a-z]*) mode I set the root password to "([^"]*)"$/ do |ui_mode, rootpw|
# Root Password, twice
- @screen.wait("DebianInstallerRootPassword.png", 30)
- @screen.type(rootpw + Sikuli::Key.ENTER)
- @screen.waitVanish("DebianInstallerRootPassword.png", 10)
+ @screen.wait(diui_png("RootPassword",ui_mode), 30)
+ @screen.type(rootpw)
+ if "gui" == ui_mode
+ @screen.type(Sikuli::Key.TAB)
+ else
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.waitVanish(diui_png("RootPassword",ui_mode), 10)
+ end
@screen.type(rootpw + Sikuli::Key.ENTER)
end
-Given /^I set the password for "([^"]*)" to be "([^"]*)"$/ do |fullname,password|
+Given /^in ([a-z]*) mode I set the password for "([^"]*)" to be "([^"]*)"$/ do |ui_mode,fullname,password|
# Username, and password twice
- @screen.wait("DebianInstallerNameOfUser.png", 10)
+ @screen.wait(diui_png("NameOfUser",ui_mode), 10)
@screen.type(fullname + Sikuli::Key.ENTER)
- @screen.waitVanish("DebianInstallerNameOfUser.png", 10)
+ @screen.waitVanish(diui_png("NameOfUser",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("DebianInstallerUserPassword.png", 10)
- @screen.type(password + Sikuli::Key.ENTER)
- @screen.waitVanish("DebianInstallerUserPassword.png", 10)
+ @screen.wait(diui_png("UserPassword",ui_mode), 10)
+ @screen.type(password)
+ if "gui" == ui_mode
+ @screen.type(Sikuli::Key.TAB)
+ else
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.waitVanish(diui_png("UserPassword",ui_mode), 10)
+ end
@screen.type(password + Sikuli::Key.ENTER)
end
- #@screen.wait("DebianInstallerNoDiskFound.png", 60)
+ #@screen.wait(diui_png("NoDiskFound",ui_mode), 60)
-Given /^I select full-disk, single-filesystem partitioning$/ do
- @screen.wait("DebianInstallerPartitioningMethod.png", 60)
+Given /^in ([a-z]*) mode I select full-disk, single-filesystem partitioning$/ do |ui_mode|
+ @screen.wait(diui_png("PartitioningMethod",ui_mode), 60)
+ sleep(10)
+ @screen.wait(diui_png("PartitioningMethod",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("DebianInstallerSelectDiskToPartition.png", 10)
+ @screen.wait(diui_png("SelectDiskToPartition",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("DebianInstallerPartitioningScheme.png", 10)
+ @screen.wait(diui_png("PartitioningScheme",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("d-i_FinishPartitioning.png", 10)
+ @screen.wait(diui_png("FinishPartitioning",ui_mode), 10)
sleep(5) # FIXME -- why do we need this? It's weird that the wait is not enough
@screen.type(Sikuli::Key.ENTER)
# prompt about Writing Partitions to disk:
- @screen.wait("d-i_No.png", 10)
- @screen.type(Sikuli::Key.TAB)
- @screen.wait("d-i_Yes.png", 10)
+ @screen.wait(diui_png("No",ui_mode), 10)
+ if "gui" == ui_mode
+ @screen.type(Sikuli::Key.DOWN)
+ else
+ @screen.type(Sikuli::Key.TAB)
+ end
+ @screen.wait(diui_png("Yes",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
end
-Given /^I note that the Base system is being installed$/ do
- @screen.wait("DebianInstallerInstallingBaseSystem.png", 30)
- @screen.waitVanish("DebianInstallerInstallingBaseSystem.png", 15 * 60)
+Given /^in ([a-z]*) mode I note that the Base system is being installed$/ do |ui_mode|
+ @screen.wait(diui_png("InstallingBaseSystem",ui_mode), 30)
+ @screen.waitVanish(diui_png("InstallingBaseSystem",ui_mode), 15 * 60)
end
-Given /^I accept the default mirror$/ do
- @screen.wait("DebianInstallerMirrorCountry.png", 10 * 60)
+Given /^in ([a-z]*) mode I accept the default mirror$/ do |ui_mode|
+ @screen.wait(diui_png("MirrorCountry",ui_mode), 10 * 60)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("d-i_ArchiveMirror.png", 5)
+ @screen.wait(diui_png("ArchiveMirror",ui_mode), 5)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("d-i_HttpProxy.png", 5)
+ @screen.wait(diui_png("HttpProxy",ui_mode), 5)
+ #@screen.type("http://local-http-proxy:3128/" + Sikuli::Key.ENTER)
@screen.type(Sikuli::Key.ENTER)
end
-Given /^I neglect to scan more CDs$/ do
- @screen.wait("d-i_ScanCD.png", 15 * 60)
+Given /^in ([a-z]*) mode I neglect to scan more CDs$/ do |ui_mode|
+ @screen.wait(diui_png("ScanCD",ui_mode), 15 * 60)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("d-i_UseNetMirror.png", 10)
- @screen.wait("d-i_Yes.png", 10)
- @screen.type(Sikuli::Key.TAB)
- @screen.wait("d-i_No.png", 10)
+ @screen.wait(diui_png("UseNetMirror",ui_mode), 10)
+ @screen.wait(diui_png("Yes",ui_mode), 10)
+ if "gui" == ui_mode
+ @screen.type(Sikuli::Key.DOWN)
+ else
+ @screen.type(Sikuli::Key.TAB)
+ end
+ @screen.wait(diui_png("No",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
end
-Given /^I ignore Popcon$/ do
- #@screen.wait("d-i_popcon.png", 10 * 60)
- @screen.wait("d-i_No.png", 10 * 60)
+Given /^in ([a-z]*) mode I ignore Popcon$/ do |ui_mode|
+ @screen.wait(diui_png("popcon",ui_mode), 10 * 60)
@screen.type(Sikuli::Key.ENTER)
+ @screen.waitVanish(diui_png("popcon",ui_mode), 10)
end
-Given /^we reach the Tasksel prompt$/ do
- @screen.wait("d-i_ChooseSoftware.png", 5 * 60)
+Given /^in ([a-z]*) mode we reach the Tasksel prompt$/ do |ui_mode|
+ @screen.wait(diui_png("ChooseSoftware",ui_mode), 5 * 60)
end
-Given /^I hit ENTER$/ do
+Given /^in ([a-z]*) mode I unset the Desktop task$/ do |ui_mode|
+ @screen.wait(diui_png("DesktopTask_Yes",ui_mode), 2 * 60)
+
+ # deal with post-snapshot screen flicker FIXME -- check if we really need this
+ sleep(5)
+ @screen.wait(diui_png("DesktopTask_Yes",ui_mode), 10)
+
+ @screen.type(Sikuli::Key.SPACE)
+ @screen.waitVanish(diui_png("DesktopTask_Yes",ui_mode), 10)
+
+ if "gui" == ui_mode
+ @screen.wait(diui_png("CONTINUEunselected",ui_mode), 10)
+ @screen.type(Sikuli::Key.TAB)
+ @screen.wait(diui_png("CONTINUEselected",ui_mode), 10)
+ end
@screen.type(Sikuli::Key.ENTER)
end
-Given /^I select the Desktop task$/ do
- @screen.wait("d-i_ChooseSoftware.png", 10)
+Given /^in ([a-z]*) mode I unset the Desktop and Print tasks$/ do |ui_mode|
+ @screen.wait(diui_png("DesktopTask_Yes",ui_mode), 2 * 60)
+
+ # deal with post-snapshot screen flicker FIXME -- check if we really need this
+ sleep(5)
+ @screen.wait(diui_png("DesktopTask_Yes",ui_mode), 10)
+
@screen.type(Sikuli::Key.SPACE)
@screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.DOWN)
@screen.type(Sikuli::Key.SPACE)
- @screen.wait("d-i_DesktopTask_Yes.png", 10)
+ @screen.waitVanish(diui_png("DesktopTask_Yes",ui_mode), 10)
+
+ if "gui" == ui_mode
+ @screen.wait(diui_png("CONTINUEunselected",ui_mode), 10)
+ @screen.type(Sikuli::Key.TAB)
+ @screen.wait(diui_png("CONTINUEselected",ui_mode), 10)
+ end
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+Given /^in ([a-z]*) mode I select the Desktop task$/ do |ui_mode|
+ @screen.wait(diui_png("DesktopTask_Yes",ui_mode), 2 * 60)
+
+ # deal with post-snapshot screen flicker -- FIXME this needs to be fixed via looking to see if the remote login is working before we look at the screen
+ debug_log("debug: Found DesktopTask_Yes, pausing for 20s", :color => :blue)
+ sleep(20)
+
+ @screen.type(Sikuli::Key.DOWN+Sikuli::Key.SPACE)
+ @screen.wait(diui_png("Desktop+Gnome",ui_mode), 10)
+ if "gui" == ui_mode
+ @screen.wait(diui_png("CONTINUEunselected",ui_mode), 10)
+ @screen.type(Sikuli::Key.TAB)
+ @screen.wait(diui_png("CONTINUEselected",ui_mode), 10)
+ end
@screen.type(Sikuli::Key.ENTER)
+ @screen.waitVanish(diui_png("Desktop+Gnome",ui_mode), 10)
+end
+
+Given /^in ([a-z]*) mode I wait while the bulk of the packages are installed$/ do |ui_mode|
+ @screen.wait(diui_png("InstallSoftware",ui_mode), 10)
+ @screen.waitVanish(diui_png("InstallSoftware",ui_mode), 80 * 60)
end
-Given /^I install GRUB$/ do
- @screen.wait("d-i_InstallGRUB.png", 80 * 60)
+Given /^in ([a-z]*) mode I install GRUB$/ do |ui_mode|
#@screen.wait("Install the GRUB", 80 * 60)
+ debug_log("debug: Look for InstallingGRUBprogress", :color => :blue)
+ @screen.wait(diui_png("InstallingGRUBprogress",ui_mode), 2 * 60)
+ debug_log("debug: Found InstallingGRUBprogress", :color => :blue)
+ @screen.waitVanish(diui_png("InstallingGRUBprogress",ui_mode), 2 * 60)
+ debug_log("debug: InstallingGRUBprogress gone again", :color => :blue)
+ debug_log("debug: Look for InstallGRUB", :color => :blue)
+ @screen.wait(diui_png("InstallGRUB",ui_mode), 2 * 60)
+ debug_log("debug: Found InstallGRUB", :color => :blue)
+ sleep(10)
+ @screen.wait(diui_png("InstallGRUB",ui_mode), 10)
+ debug_log("debug: Found InstallGRUB (again)", :color => :blue)
+ if "gui" == ui_mode
+ debug_log("debug: We're in GUI mode", :color => :blue)
+ @screen.wait(diui_png("CONTINUEunselected",ui_mode), 10)
+ debug_log("debug: Found CONTINUEunselected", :color => :blue)
+ sleep(10)
+ debug_log("debug: Press UP", :color => :blue)
+ @screen.type(Sikuli::Key.UP)
+ sleep(10)
+ debug_log("debug: Press DOWN", :color => :blue)
+ @screen.type(Sikuli::Key.DOWN)
+ sleep(10)
+ debug_log("debug: Press TAB", :color => :blue)
+ @screen.type(Sikuli::Key.TAB)
+ @screen.wait(diui_png("CONTINUEselected",ui_mode), 10)
+ debug_log("debug: Found CONTINUEselected", :color => :blue)
+ end
+ debug_log("debug: Press ENTER", :color => :blue)
@screen.type(Sikuli::Key.ENTER)
- @screen.wait("d-i_GRUBEnterDev.png", 10 * 60)
+ @screen.wait(diui_png("GRUBEnterDev",ui_mode), 10 * 60)
@screen.type(Sikuli::Key.DOWN)
- @screen.wait("d-i_GRUBdev.png", 10)
+ @screen.wait(diui_png("GRUBdev",ui_mode), 10)
@screen.type(Sikuli::Key.ENTER)
end
-Given /^I allow reboot after the install is complete$/ do
- @screen.wait("d-i_InstallComplete.png", 2 * 60)
+Given /^in ([a-z]*) mode I allow reboot after the install is complete$/ do |ui_mode|
+ @screen.wait(diui_png("InstallComplete",ui_mode), 2 * 60)
@screen.type(Sikuli::Key.ENTER)
end
@@ -394,11 +507,7 @@ Given /^I wait for the reboot$/ do
@screen.wait(bootsplash, 10 * 60)
end
-Given /^I make sure that we boot from disk$/ do
- @screen.wait("d-i_GRUB_Debian.png", 5 * 60)
-end
-
-Given /^I wait for a Login Prompt$/ do
+Given /^I should see a Login prompt$/ do
@screen.wait("DebianLoginPromptVT.png", 2 * 60)
end
diff --git a/cucumber/features/step_definitions/snapshots.rb b/cucumber/features/step_definitions/snapshots.rb
index 13e4a5b..2e06410 100644
--- a/cucumber/features/step_definitions/snapshots.rb
+++ b/cucumber/features/step_definitions/snapshots.rb
@@ -2,201 +2,125 @@ def checkpoints
{
'boot-d-i-to-tasksel' => {
:description => "I have started Debian Installer and stopped at the Tasksel prompt",
- #:parent_checkpoint => 'no-network-logged-in',
+ :parent_checkpoint => nil,
:steps => [
'I create a 8 GiB disk named "target"',
'I plug ide drive "target"',
'I start the computer',
- 'the computer boots DebianInstaller',
- 'I select British English',
- 'I accept the hostname, using "example.com" as the domain',
- 'I set the root password to "rootme"',
- 'I set the password for "Philip Hands" to be "verysecret"',
- 'I select full-disk, single-filesystem partitioning',
- 'I note that the Base system is being installed',
- 'I accept the default mirror',
- 'I ignore Popcon',
- 'we reach the Tasksel prompt',
+ 'I boot the computer, and select text mode',
+ 'in text mode I select British English',
+ 'in text mode I accept the hostname, using "example.com" as the domain',
+ 'in text mode I set the root password to "rootme"',
+ 'in text mode I set the password for "Philip Hands" to be "verysecret"',
+ 'in text mode I select full-disk, single-filesystem partitioning',
+ 'in text mode I note that the Base system is being installed',
+ 'in text mode I accept the default mirror',
+ 'in text mode I ignore Popcon',
+ 'in text mode we reach the Tasksel prompt',
],
},
- 'debian-minimal-install' => {
- :description => "I have installed Minimal Debian",
- :parent_checkpoint => 'boot-d-i-to-tasksel',
+ 'boot-g-i-to-tasksel' => {
+ :description => "I have started GUI Debian Installer and stopped at the Tasksel prompt",
+ :parent_checkpoint => nil,
:steps => [
- 'I hit ENTER',
- 'I install GRUB',
- 'I allow reboot after the install is complete',
- 'I wait for the reboot',
- 'I power off the computer',
- 'the computer is set to boot from ide drive "target"',
+ 'I create a 8 GiB disk named "target"',
+ 'I plug ide drive "target"',
+ 'I start the computer',
+ 'I boot the computer, and select gui mode',
+ 'in gui mode I select British English',
+ 'in gui mode I accept the hostname, using "example.com" as the domain',
+ 'in gui mode I set the root password to "rootme"',
+ 'in gui mode I set the password for "Philip Hands" to be "verysecret"',
+ 'in gui mode I select full-disk, single-filesystem partitioning',
+ 'in gui mode I note that the Base system is being installed',
+ 'in gui mode I accept the default mirror',
+ 'in gui mode I ignore Popcon',
+ 'in gui mode we reach the Tasksel prompt',
],
},
- 'debian-gnome-install' => {
- :description => "I have installed Gnome Desktop Debian",
+ 'debian-console-install' => {
+ :description => "I install a non-GUI Debian system, in text mode",
:parent_checkpoint => 'boot-d-i-to-tasksel',
:steps => [
- 'I select the Desktop task',
- 'I install GRUB',
- 'I allow reboot after the install is complete',
+ 'in text mode I unset the Desktop task',
+ 'in text mode I wait while the bulk of the packages are installed',
+ 'in text mode I install GRUB',
+ 'in text mode I allow reboot after the install is complete',
'I wait for the reboot',
'I power off the computer',
'the computer is set to boot from ide drive "target"',
],
},
- 'tails-greeter' => {
- :description => "I have started Tails from DVD without network and stopped at Tails Greeter's login screen",
- :parent_checkpoint => nil,
- :steps => [
- 'the network is unplugged',
- 'I start the computer',
- 'the computer boots Tails'
- ],
- },
-
- 'no-network-logged-in' => {
- :description => "I have started Tails from DVD without network and logged in",
- :parent_checkpoint => "tails-greeter",
- :steps => [
- 'I log in to a new session',
- 'Tails Greeter has dealt with the sudo password',
- 'the Tails desktop is ready',
- ],
- },
-
- 'with-no-network-and-i2p' => {
- :temporary => true,
- :description => 'I have started Tails from DVD with I2P enabled and logged in',
+ 'debian-gui-console-install' => {
+ :description => "I install a non-GUI Debian system, in gui mode",
+ :parent_checkpoint => 'boot-g-i-to-tasksel',
:steps => [
- 'I set Tails to boot with options "i2p"',
- 'the network is unplugged',
- 'I start the computer',
- 'the computer boots Tails',
- 'I log in to a new session',
- 'the Tails desktop is ready',
- ],
- },
-
- 'with-network-and-i2p' => {
- :temporary => true,
- :description => 'I have started Tails from DVD with I2P enabled and logged in and the network is connected',
- :parent_checkpoint => "with-no-network-and-i2p",
- :steps => [
- 'the network is plugged',
- 'Tor is ready',
- 'I2P is running',
- 'all notifications have disappeared',
- 'available upgrades have been checked',
- "I2P's reseeding completed",
- ],
- },
-
- 'with-network-logged-in' => {
- :description => "I have started Tails from DVD and logged in and the network is connected",
- :parent_checkpoint => "no-network-logged-in",
- :steps => [
- 'the network is plugged',
- 'Tor is ready',
- 'all notifications have disappeared',
- 'available upgrades have been checked',
- ],
- },
-
- 'no-network-bridge-mode' => {
- :temporary => true,
- :description => "I have started Tails from DVD without network and logged in with bridge mode enabled",
- :parent_checkpoint => "tails-greeter",
- :steps => [
- 'I enable more Tails Greeter options',
- 'I enable the specific Tor configuration option',
- 'I log in to a new session',
- 'Tails Greeter has dealt with the sudo password',
- 'the Tails desktop is ready',
- 'all notifications have disappeared',
- ],
- },
-
- 'no-network-logged-in-sudo-passwd' => {
- :temporary => true,
- :description => "I have started Tails from DVD without network and logged in with an administration password",
- :parent_checkpoint => "tails-greeter",
- :steps => [
- 'I enable more Tails Greeter options',
- 'I set an administration password',
- 'I log in to a new session',
- 'Tails Greeter has dealt with the sudo password',
- 'the Tails desktop is ready',
- ],
- },
-
- 'with-network-logged-in-sudo-passwd' => {
- :temporary => true,
- :description => "I have started Tails from DVD and logged in with an administration password and the network is connected",
- :parent_checkpoint => "no-network-logged-in-sudo-passwd",
- :steps => [
- 'the network is plugged',
- 'Tor is ready',
- 'all notifications have disappeared',
- 'available upgrades have been checked',
+ 'in gui mode I unset the Desktop task',
+ 'in gui mode I wait while the bulk of the packages are installed',
+ 'in gui mode I install GRUB',
+ 'in gui mode I allow reboot after the install is complete',
+ 'I wait for the reboot',
+ 'I power off the computer',
+ 'the computer is set to boot from ide drive "target"',
],
},
- 'usb-install-tails-greeter' => {
- :description => "I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen",
- :parent_checkpoint => 'no-network-logged-in',
+ 'debian-minimal-install' => {
+ :description => "I install a Minimal Debian system, in text mode",
+ :parent_checkpoint => 'boot-d-i-to-tasksel',
:steps => [
- 'I create a 4 GiB disk named "__internal"',
- 'I plug USB drive "__internal"',
- 'I "Clone & Install" Tails to USB drive "__internal"',
- 'the running Tails is installed on USB drive "__internal"',
- 'there is no persistence partition on USB drive "__internal"',
- 'I shutdown Tails and wait for the computer to power off',
- 'I start Tails from USB drive "__internal" with network unplugged',
- 'the boot device has safe access rights',
- 'Tails is running from USB drive "__internal"',
- 'there is no persistence partition on USB drive "__internal"',
- 'process "udev-watchdog" is running',
- 'udev-watchdog is monitoring the correct device',
+ 'in text mode I unset the Desktop and Print tasks',
+ 'in text mode I wait while the bulk of the packages are installed',
+ 'in text mode I install GRUB',
+ 'in text mode I allow reboot after the install is complete',
+ 'I wait for the reboot',
+ 'I power off the computer',
+ 'the computer is set to boot from ide drive "target"',
],
},
- 'usb-install-logged-in' => {
- :description => "I have started Tails without network from a USB drive without a persistent partition and logged in",
- :parent_checkpoint => 'usb-install-tails-greeter',
+ 'debian-gui-minimal-install' => {
+ :description => "I install a Minimal Debian system, in gui mode",
+ :parent_checkpoint => 'boot-g-i-to-tasksel',
:steps => [
- 'I log in to a new session',
- 'the Tails desktop is ready',
+ 'in gui mode I unset the Desktop and Print tasks',
+ 'in gui mode I wait while the bulk of the packages are installed',
+ 'in gui mode I install GRUB',
+ 'in gui mode I allow reboot after the install is complete',
+ 'I wait for the reboot',
+ 'I power off the computer',
+ 'the computer is set to boot from ide drive "target"',
],
},
- 'usb-install-with-persistence-tails-greeter' => {
- :description => "I have started Tails without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen",
- :parent_checkpoint => 'usb-install-logged-in',
+ 'debian-gnome-install' => {
+ :description => "I install a Gnome Desktop Debian system, in text mode",
+ :parent_checkpoint => 'boot-d-i-to-tasksel',
:steps => [
- 'I create a persistent partition',
- 'a Tails persistence partition exists on USB drive "__internal"',
- 'I shutdown Tails and wait for the computer to power off',
- 'I start Tails from USB drive "__internal" with network unplugged',
- 'the boot device has safe access rights',
- 'Tails is running from USB drive "__internal"',
- 'process "udev-watchdog" is running',
- 'udev-watchdog is monitoring the correct device',
+ 'in text mode I select the Desktop task',
+ 'in text mode I wait while the bulk of the packages are installed',
+ 'in text mode I install GRUB',
+ 'in text mode I allow reboot after the install is complete',
+ 'I wait for the reboot',
+ 'I power off the computer',
+ 'the computer is set to boot from ide drive "target"',
],
},
- 'usb-install-with-persistence-logged-in' => {
- :description => "I have started Tails without network from a USB drive with a persistent partition enabled and logged in",
- :parent_checkpoint => 'usb-install-with-persistence-tails-greeter',
+ 'debian-gui-gnome-install' => {
+ :description => "I install a Gnome Desktop Debian system, in gui mode",
+ :parent_checkpoint => 'boot-g-i-to-tasksel',
:steps => [
- 'I enable persistence',
- 'I log in to a new session',
- 'the Tails desktop is ready',
- 'all persistence presets are enabled',
- 'all persistent filesystems have safe access rights',
- 'all persistence configuration files have safe access rights',
- 'all persistent directories have safe access rights',
+ 'in gui mode I select the Desktop task',
+ 'in gui mode I wait while the bulk of the packages are installed',
+ 'in gui mode I install GRUB',
+ 'in gui mode I allow reboot after the install is complete',
+ 'I wait for the reboot',
+ 'I power off the computer',
+ 'the computer is set to boot from ide drive "target"',
],
},
}
diff --git a/cucumber/features/support/config.rb b/cucumber/features/support/config.rb
index 25c107b..6043224 100644
--- a/cucumber/features/support/config.rb
+++ b/cucumber/features/support/config.rb
@@ -1,11 +1,11 @@
require 'fileutils'
require 'yaml'
-require "features/support/helpers/misc_helpers.rb"
+require "cucumber/features/support/helpers/misc_helpers.rb"
# These files deal with options like some of the settings passed
# to the `run_test_suite` script, and "secrets" like credentials
# (passwords, SSH keys) to be used in tests.
-CONFIG_DIR = "/srv/jenkins/features/config"
+CONFIG_DIR = "/srv/jenkins/cucumber/features/config"
DEFAULTS_CONFIG_FILE = "#{CONFIG_DIR}/defaults.yml"
LOCAL_CONFIG_FILE = "#{CONFIG_DIR}/local.yml"
LOCAL_CONFIG_DIRS_FILES_GLOB = "#{CONFIG_DIR}/*.d/*.yml"
@@ -15,7 +15,7 @@ $tails_iso = ENV['ISO'] || get_newest_iso
$old_tails_iso = ENV['OLD_ISO'] || get_oldest_iso
$tmp_dir = ENV['PWD']
$vm_xml_path = ENV['VM_XML_PATH']
-$misc_files_dir = "features/misc_files"
+$misc_files_dir = "cucumber/features/misc_files"
$keep_snapshots = !ENV['KEEP_SNAPSHOTS'].nil?
$x_display = ENV['DISPLAY']
$debug = !ENV['DEBUG'].nil?
@@ -58,13 +58,7 @@ LIVE_USER = "live_user"
TAILS_ISO = ENV['ISO']
OLD_TAILS_ISO = ENV['OLD_ISO'] || TAILS_ISO
TIME_AT_START = Time.now
-loop do
- ARTIFACTS_DIR = $config['TMPDIR'] + "/results"
- if not(File.exist?(ARTIFACTS_DIR))
- FileUtils.mkdir_p(ARTIFACTS_DIR)
- break
- end
-end
+ARTIFACTS_DIR = $config['TMPDIR'] + "/results"
# Constants that are statically initialized.
CONFIGURED_KEYSERVER_HOSTNAME = 'hkps.pool.sks-keyservers.net'
@@ -72,7 +66,7 @@ LIBVIRT_DOMAIN_NAME = "DebianToaster"
LIBVIRT_DOMAIN_UUID = "203552d5-819c-41f3-800e-2c8ef2545404"
LIBVIRT_NETWORK_NAME = "DebianToasterNet"
LIBVIRT_NETWORK_UUID = "f2305af3-2a64-4f16-afe6-b9dbf02a597e"
-MISC_FILES_DIR = "/srv/jenkins/features/misc_files"
+MISC_FILES_DIR = "/srv/jenkins/cucumber/features/misc_files"
SERVICES_EXPECTED_ON_ALL_IFACES =
[
["cupsd", "0.0.0.0", "631"],
@@ -94,7 +88,7 @@ TOR_AUTHORITIES =
"171.25.193.9",
"154.35.175.225",
]
-VM_XML_PATH = "/srv/jenkins/features/domains"
+VM_XML_PATH = "/srv/jenkins/cucumber/features/domains"
#TAILS_SIGNING_KEY = cmd_helper(". #{Dir.pwd}/config/amnesia; echo ${AMNESIA_DEV_KEYID}").tr(' ', '').chomp
TAILS_DEBIAN_REPO_KEY = "221F9A3C6FA3E09E182E060BC7988EA7A358D82E"
diff --git a/cucumber/features/support/env.rb b/cucumber/features/support/env.rb
index 2e17ae7..53f502e 100644
--- a/cucumber/features/support/env.rb
+++ b/cucumber/features/support/env.rb
@@ -1,5 +1,5 @@
require 'rubygems'
-require "features/support/extra_hooks.rb"
+require "cucumber/features/support/extra_hooks.rb"
require 'time'
require 'rspec'
diff --git a/hosts/jenkins-test-vm/job-cfg/lvc.yaml b/hosts/jenkins-test-vm/job-cfg/lvc.yaml
new file mode 120000
index 0000000..e274ac6
--- /dev/null
+++ b/hosts/jenkins-test-vm/job-cfg/lvc.yaml
@@ -0,0 +1 @@
+../../../job-cfg/lvc.yaml
\ No newline at end of file
diff --git a/hosts/jenkins/job-cfg b/hosts/jenkins/job-cfg
new file mode 120000
index 0000000..8b7ea8b
--- /dev/null
+++ b/hosts/jenkins/job-cfg
@@ -0,0 +1 @@
+../../job-cfg
\ No newline at end of file
diff --git a/job-cfg/lvc.yaml b/job-cfg/lvc.yaml
index d9969b9..99d9dc6 100644
--- a/job-cfg/lvc.yaml
+++ b/job-cfg/lvc.yaml
@@ -31,7 +31,7 @@
- email:
recipients: 'qa-jenkins-scm at lists.alioth.debian.org'
- archive:
- artifacts: 'run-*/*.mkv, {my_pngs}'
+ artifacts: '{my_pngs}, results/*.mkv, results/*.log'
latest-only: false
- image-gallery:
- title: '{my_title}'
@@ -40,52 +40,29 @@
wrappers:
- live-screenshot
builders:
- - shell: '/srv/jenkins/bin/lvc/run_test_suite {my_params}'
+ - shell: '/srv/jenkins/bin/lvc.sh {my_iso} /srv/jenkins/cucumber/features'
triggers:
- timed: '{my_time}'
- job-template:
defaults: lvc
- name: '{name}_debian-live_{distro}_{flavour}_apt'
-
-- job-template:
- defaults: lvc
- name: '{name}_debian-installer_{distro}_{flavour}_apt'
+ name: '{name}_{distro}'
- project:
name: lvc
- my_title: '{dist_name} {flav_name}'
- my_time: '23 45 31 12 *'
- my_pngs: 'run-*/*.png'
- my_description: 'LVC stands for _l_ib_v_irt-_c_ucumber, so these are <a href="https://tracker.debian.org/pkg/cucumber">cucumber</a> driven tests for Debian installer and more. Currently under heavy development and a better name should probably be choosen too.'
- my_params: '--capture lvc_debian-live_{distro}_{flavour}_apt.webm --tmpdir $WORKSPACE --iso /srv/live-build/results/{distro}_{flavour}_live_amd64.iso -- --verbose --backtrace --expand --format pretty DebianLive/apt.feature'
+ my_title: 'Cucumber: {dist_name}'
+ my_time: '45 23 31 12 *'
+ my_pngs: 'results/*.png'
+ my_description: 'Work in progress...'
jobs:
- - '{name}_debian-live_{distro}_{flavour}_apt':
- distro:
- - 'debian-edu_jessie': {dist_name: 'Debian Edu Live 8'}
- flavour:
- - 'standalone': {flav_name: 'Standalone'}
- - 'workstation': {flav_name: 'Workstation'}
- my_iso: '/srv/live-build/results/{distro}_{flavour}_live_amd64.iso'
-
- - '{name}_debian-live_{distro}_{flavour}_apt':
- distro:
- - 'debian_jessie': {dist_name: 'Debian Live 8'}
- flavour:
- - 'gnome': {flav_name: 'GNOME Desktop'}
- - 'xfce': {flav_name: 'Xfce Desktop'}
- my_iso: '/srv/live-build/results/{distro}_{flavour}_live_amd64.iso'
-
- - '{name}_debian-live_{distro}_{flavour}_apt':
- distro:
- - 'debian_sid': {dist_name: 'Debian Live Sid'}
- flavour:
- - 'xfce': {flav_name: 'Xfce Desktop'}
- my_iso: '/srv/live-build/results/{distro}_{flavour}_live_amd64.iso'
-
- - '{name}_debian-installer_{distro}_{flavour}_apt':
+ - '{name}_{distro}':
distro:
- - 'jessie': {dist_name: 'Debian-Installer 8'}
- flavour:
- - 'standard': {flav_name: 'standard'}
- my_params: '--capture --iso /srv/live-build/results/debian-8.3.0-amd64-netinst.iso --tmpdir $WORKSPACE --old-iso /srv/live-build/results/debian-8.3.0-amd64-netinst.iso -- --format pretty --format pretty_debug --out $WORKSPACE/pretty_debug.log /srv/jenkins/features/step_definitions /srv/jenkins/features/support /srv/jenkins/features/DebianLive/apt.feature'
+ #- 'debian-stable':
+ # dist_name: 'Debian-Installer stable'
+ # my_iso: 'http://cdimage.debian.org/debian-cd/8.4.0/amd64/iso-cd/debian-8.4.0-amd64-netinst.iso'
+ - 'debian-8.4.0':
+ dist_name: 'Debian-Installer 8.4.0'
+ my_iso: 'http://cdimage.debian.org/debian-cd/8.4.0/amd64/iso-cd/debian-8.4.0-amd64-netinst.iso'
+ #- 'debian-testing-daily':
+ # dist_name: 'Debian-Installer Testing (Daily)'
+ # my_iso: 'http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/arm64/iso-cd/debian-testing-arm64-netinst.iso'
diff --git a/update_jdn.sh b/update_jdn.sh
index f272b84..846d29d 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -18,19 +18,6 @@ explain() {
echo "$HOSTNAME: $1"
}
-conditional_disable() {
- if [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
- case "$1" in
- piuparts.yaml) return 1;;
- schroot.yaml) return 1;;
- lvc.yaml) return 1;;
- d-i.yaml) return 1;;
- *) return 0;;
- esac
- fi
- return 1
-}
-
echo "--------------------------------------------"
explain "$(date) - begin deployment update."
@@ -451,10 +438,20 @@ explain "packages configured."
# install the heart of jenkins.debian.net
#
cd $BASEDIR
-for dir in bin bin/lvc logparse job-cfg features live ; do
+[ -d /srv/jenkins/features ] && sudo rm -rf /srv/jenkins/features
+for dir in bin logparse cucumber live ; do
sudo cp --preserve=mode,timestamps -r $dir /srv/jenkins/
sudo chown -R jenkins-adm.jenkins-adm /srv/jenkins/$dir
done
+HOST_JOBS="hosts/$HOSTNAME/job-cfg"
+if [ -e "$HOST_JOBS" ] ; then
+ sudo rsync -r --copy-links --delete "$HOST_JOBS/" /srv/jenkins/job-cfg/
+ sudo chown -R jenkins-adm.jenkins-adm /srv/jenkins/$dir
+else
+ # tidying up ... assuming that we don't want clutter on peripheral servers
+ [ -d /srv/jenkins/job-cfg ] && sudo rm -rf /srv/jenkins/job-cfg
+fi
+
sudo mkdir -p /var/lib/jenkins/.ssh
if [ "$HOSTNAME" = "jenkins" ] ; then
sudo cp jenkins-home/procmailrc /var/lib/jenkins/.procmailrc
@@ -509,7 +506,6 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
rm -f $TMPFILE
for config in *.yaml ; do
if [ $config -nt $STAMP ] || [ ! -f $STAMP ] ; then
- conditional_disable $config && continue
$JJB update $config
else
echo "$config has not changed, nothing to do."
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list