summaryrefslogtreecommitdiffstats
path: root/cucumber
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-05-11 17:22:32 +0200
committerPhilip Hands <phil@hands.com>2016-05-11 17:22:32 +0200
commit88d376c9b7d2e52dee57fc67b2cbd07422a4e5bd (patch)
tree63cdd3188dd02c3ab644180f1668ca2fd4578d2c /cucumber
parenta5d56e3b5443263b53b0487c81125123411bd0cf (diff)
downloadjenkins.debian.net-88d376c9b7d2e52dee57fc67b2cbd07422a4e5bd.tar.xz
combined diff with most of the cucmber changes, plus update_jdn stuff
Diffstat (limited to 'cucumber')
-rw-r--r--cucumber/README-sikuli-cucumber34
-rwxr-xr-xcucumber/bin/run_test_suite4
-rw-r--r--cucumber/features/images/DebianInstallerHttpProxy.pngbin485 -> 0 bytes
-rw-r--r--cucumber/features/images/d-i_GRUB_Debian.pngbin387 -> 0 bytes
-rw-r--r--cucumber/features/images/d-i_HttpProxy.pngbin5324 -> 0 bytes
-rw-r--r--cucumber/features/images/d-i_InstallGRUB.pngbin6367 -> 0 bytes
-rw-r--r--cucumber/features/images/d-i_gui_ArchiveMirror.pngbin0 -> 5265 bytes
-rw-r--r--cucumber/features/images/d-i_gui_BritishEnglish.pngbin0 -> 3841 bytes
-rw-r--r--cucumber/features/images/d-i_gui_CONTINUEselected.pngbin0 -> 3919 bytes
-rw-r--r--cucumber/features/images/d-i_gui_CONTINUEunselected.pngbin0 -> 2814 bytes
-rw-r--r--cucumber/features/images/d-i_gui_ChooseSoftware.pngbin0 -> 5924 bytes
-rw-r--r--cucumber/features/images/d-i_gui_Desktop+Gnome.pngbin0 -> 15335 bytes
-rw-r--r--cucumber/features/images/d-i_gui_DesktopTask_No.pngbin0 -> 1322 bytes
-rw-r--r--cucumber/features/images/d-i_gui_DesktopTask_Yes.pngbin0 -> 8920 bytes
-rw-r--r--cucumber/features/images/d-i_gui_DomainName.pngbin0 -> 2880 bytes
-rw-r--r--cucumber/features/images/d-i_gui_English.pngbin0 -> 2768 bytes
-rw-r--r--cucumber/features/images/d-i_gui_EnterTheHostname.pngbin0 -> 7878 bytes
-rw-r--r--cucumber/features/images/d-i_gui_FinishPartitioning.pngbin0 -> 14728 bytes
-rw-r--r--cucumber/features/images/d-i_gui_GRUBEnterDev.pngbin0 -> 19466 bytes
-rw-r--r--cucumber/features/images/d-i_gui_GRUBdev.pngbin0 -> 12068 bytes
-rw-r--r--cucumber/features/images/d-i_gui_HttpProxy.pngbin0 -> 5087 bytes
-rw-r--r--cucumber/features/images/d-i_gui_InstallComplete.pngbin0 -> 9404 bytes
-rw-r--r--cucumber/features/images/d-i_gui_InstallGRUB.pngbin0 -> 15554 bytes
-rw-r--r--cucumber/features/images/d-i_gui_InstallSoftware.pngbin0 -> 7357 bytes
-rw-r--r--cucumber/features/images/d-i_gui_InstallingBaseSystem.pngbin0 -> 5818 bytes
-rw-r--r--cucumber/features/images/d-i_gui_InstallingGRUBprogress.pngbin0 -> 8928 bytes
-rw-r--r--cucumber/features/images/d-i_gui_MirrorCountry.pngbin0 -> 8224 bytes
-rw-r--r--cucumber/features/images/d-i_gui_NameOfUser.pngbin0 -> 5622 bytes
-rw-r--r--cucumber/features/images/d-i_gui_No.pngbin0 -> 4330 bytes
-rw-r--r--cucumber/features/images/d-i_gui_PartitioningMethod.pngbin0 -> 9878 bytes
-rw-r--r--cucumber/features/images/d-i_gui_PartitioningScheme.pngbin0 -> 8981 bytes
-rw-r--r--cucumber/features/images/d-i_gui_RootPassword.pngbin0 -> 3650 bytes
-rw-r--r--cucumber/features/images/d-i_gui_ScanCD.pngbin0 -> 1779 bytes
-rw-r--r--cucumber/features/images/d-i_gui_SelectDiskToPartition.pngbin0 -> 7584 bytes
-rw-r--r--cucumber/features/images/d-i_gui_SelectYourLocation.pngbin0 -> 4229 bytes
-rw-r--r--cucumber/features/images/d-i_gui_UnitedKingdom.pngbin0 -> 4256 bytes
-rw-r--r--cucumber/features/images/d-i_gui_UseNetMirror.pngbin0 -> 1663 bytes
-rw-r--r--cucumber/features/images/d-i_gui_UserPassword.pngbin0 -> 7667 bytes
-rw-r--r--cucumber/features/images/d-i_gui_Yes.pngbin0 -> 4147 bytes
-rw-r--r--cucumber/features/images/d-i_gui_popcon.pngbin0 -> 13176 bytes
-rw-r--r--cucumber/features/images/d-i_popcon.pngbin3894 -> 0 bytes
-rw-r--r--cucumber/features/images/d-i_text_ArchiveMirror.png (renamed from cucumber/features/images/d-i_ArchiveMirror.png)bin2908 -> 2908 bytes
-rw-r--r--cucumber/features/images/d-i_text_BritishEnglish.png (renamed from cucumber/features/images/DebianInstallerSelectLangEnglishUK.png)bin4853 -> 4853 bytes
-rw-r--r--cucumber/features/images/d-i_text_ChooseSoftware.png (renamed from cucumber/features/images/d-i_ChooseSoftware.png)bin4204 -> 4204 bytes
-rw-r--r--cucumber/features/images/d-i_text_Desktop+Gnome.pngbin0 -> 5135 bytes
-rw-r--r--cucumber/features/images/d-i_text_DesktopTask_No.png (renamed from cucumber/features/images/d-i_DesktopTask_No.png)bin7161 -> 7161 bytes
-rw-r--r--cucumber/features/images/d-i_text_DesktopTask_Yes.png (renamed from cucumber/features/images/d-i_DesktopTask_Yes.png)bin4152 -> 4152 bytes
-rw-r--r--cucumber/features/images/d-i_text_DomainName.png (renamed from cucumber/features/images/DebianInstallerDomainPrompt.png)bin2225 -> 2225 bytes
-rw-r--r--cucumber/features/images/d-i_text_English.png (renamed from cucumber/features/images/DebianInstallerSelectLangEnglish.png)bin7229 -> 7229 bytes
-rw-r--r--cucumber/features/images/d-i_text_EnterTheHostname.png (renamed from cucumber/features/images/DebianInstallerHostnamePrompt.png)bin5643 -> 5643 bytes
-rw-r--r--cucumber/features/images/d-i_text_F12BootMenu.png (renamed from cucumber/features/images/d-i_F12BootMenu.png)bin482 -> 482 bytes
-rw-r--r--cucumber/features/images/d-i_text_FinishPartitioning.png (renamed from cucumber/features/images/d-i_FinishPartitioning.png)bin8734 -> 8734 bytes
-rw-r--r--cucumber/features/images/d-i_text_GRUBEnterDev.png (renamed from cucumber/features/images/d-i_GRUBEnterDev.png)bin2490 -> 2490 bytes
-rw-r--r--cucumber/features/images/d-i_text_GRUBdev.png (renamed from cucumber/features/images/d-i_GRUBdev.png)bin1765 -> 1765 bytes
-rw-r--r--cucumber/features/images/d-i_text_HttpProxy.pngbin0 -> 5346 bytes
-rw-r--r--cucumber/features/images/d-i_text_InstallComplete.png (renamed from cucumber/features/images/d-i_InstallComplete.png)bin2740 -> 2740 bytes
-rw-r--r--cucumber/features/images/d-i_text_InstallGRUB.pngbin0 -> 3221 bytes
-rw-r--r--cucumber/features/images/d-i_text_InstallSoftware.pngbin0 -> 9341 bytes
-rw-r--r--cucumber/features/images/d-i_text_InstallingBaseSystem.png (renamed from cucumber/features/images/DebianInstallerInstallingBaseSystem.png)bin3554 -> 3554 bytes
-rw-r--r--cucumber/features/images/d-i_text_InstallingGRUBprogress.pngbin0 -> 10406 bytes
-rw-r--r--cucumber/features/images/d-i_text_MirrorCountry.png (renamed from cucumber/features/images/DebianInstallerMirrorCountry.png)bin3769 -> 3769 bytes
-rw-r--r--cucumber/features/images/d-i_text_NameOfUser.png (renamed from cucumber/features/images/DebianInstallerNameOfUser.png)bin3792 -> 3792 bytes
-rw-r--r--cucumber/features/images/d-i_text_No.png (renamed from cucumber/features/images/d-i_No.png)bin995 -> 995 bytes
-rw-r--r--cucumber/features/images/d-i_text_NoDiskFound.png (renamed from cucumber/features/images/DebianInstallerNoDiskFound.png)bin4005 -> 4005 bytes
-rw-r--r--cucumber/features/images/d-i_text_PartitioningMethod.png (renamed from cucumber/features/images/DebianInstallerPartitioningMethod.png)bin13953 -> 13953 bytes
-rw-r--r--cucumber/features/images/d-i_text_PartitioningScheme.png (renamed from cucumber/features/images/DebianInstallerPartitioningScheme.png)bin2879 -> 2879 bytes
-rw-r--r--cucumber/features/images/d-i_text_RootPassword.png (renamed from cucumber/features/images/DebianInstallerRootPassword.png)bin3226 -> 3226 bytes
-rw-r--r--cucumber/features/images/d-i_text_ScanCD.png (renamed from cucumber/features/images/d-i_ScanCD.png)bin3216 -> 3216 bytes
-rw-r--r--cucumber/features/images/d-i_text_SelectBootDev.png (renamed from cucumber/features/images/d-i_SelectBootDev.png)bin559 -> 559 bytes
-rw-r--r--cucumber/features/images/d-i_text_SelectDiskToPartition.png (renamed from cucumber/features/images/DebianInstallerSelectDiskToPartition.png)bin5403 -> 5403 bytes
-rw-r--r--cucumber/features/images/d-i_text_SelectYourLocation.png (renamed from cucumber/features/images/DebianInstallerCountrySelection.png)bin5303 -> 5303 bytes
-rw-r--r--cucumber/features/images/d-i_text_UnitedKingdom.pngbin0 -> 4162 bytes
-rw-r--r--cucumber/features/images/d-i_text_UseNetMirror.png (renamed from cucumber/features/images/d-i_UseNetMirror.png)bin2975 -> 2975 bytes
-rw-r--r--cucumber/features/images/d-i_text_UserPassword.png (renamed from cucumber/features/images/DebianInstallerUserPassword.png)bin4892 -> 4892 bytes
-rw-r--r--cucumber/features/images/d-i_text_Yes.png (renamed from cucumber/features/images/d-i_Yes.png)bin1163 -> 1163 bytes
-rw-r--r--cucumber/features/images/d-i_text_bootmenu_graphical.pngbin0 -> 15704 bytes
-rw-r--r--cucumber/features/images/d-i_text_popcon.pngbin0 -> 10013 bytes
-rw-r--r--cucumber/features/install.feature27
-rwxr-xr-xcucumber/features/scripts/vm-execute4
-rw-r--r--cucumber/features/step_definitions/common_steps.rb241
-rw-r--r--cucumber/features/step_definitions/snapshots.rb242
-rw-r--r--cucumber/features/support/config.rb18
-rw-r--r--cucumber/features/support/env.rb2
83 files changed, 321 insertions, 251 deletions
diff --git a/cucumber/README-sikuli-cucumber b/cucumber/README-sikuli-cucumber
index 24d90aaf..34430c5e 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 5b40c389..86e7ea7d 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 04b3e13e..00000000
--- a/cucumber/features/images/DebianInstallerHttpProxy.png
+++ /dev/null
Binary files 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 3b67cfbe..00000000
--- a/cucumber/features/images/d-i_GRUB_Debian.png
+++ /dev/null
Binary files differ
diff --git a/cucumber/features/images/d-i_HttpProxy.png b/cucumber/features/images/d-i_HttpProxy.png
deleted file mode 100644
index 4163a5b3..00000000
--- a/cucumber/features/images/d-i_HttpProxy.png
+++ /dev/null
Binary files differ
diff --git a/cucumber/features/images/d-i_InstallGRUB.png b/cucumber/features/images/d-i_InstallGRUB.png
deleted file mode 100644
index e491fbd1..00000000
--- a/cucumber/features/images/d-i_InstallGRUB.png
+++ /dev/null
Binary files 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 00000000..d9658437
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_ArchiveMirror.png
Binary files 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 00000000..466fbecf
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_BritishEnglish.png
Binary files 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 00000000..436eeb61
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_CONTINUEselected.png
Binary files 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 00000000..be82588b
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_CONTINUEunselected.png
Binary files 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 00000000..c34906c4
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_ChooseSoftware.png
Binary files 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 00000000..3d34917c
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_Desktop+Gnome.png
Binary files 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 00000000..7e2cbc2d
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_DesktopTask_No.png
Binary files 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 00000000..c92a8f61
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_DesktopTask_Yes.png
Binary files 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 00000000..045ab5ab
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_DomainName.png
Binary files 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 00000000..4aadb347
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_English.png
Binary files 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 00000000..c3c9b7da
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_EnterTheHostname.png
Binary files 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 00000000..2d721761
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_FinishPartitioning.png
Binary files 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 00000000..05ec9e8e
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_GRUBEnterDev.png
Binary files 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 00000000..2e96df0a
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_GRUBdev.png
Binary files 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 00000000..bed3ade3
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_HttpProxy.png
Binary files 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 00000000..c38b9cb3
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_InstallComplete.png
Binary files 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 00000000..63332a58
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_InstallGRUB.png
Binary files 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 00000000..a2551fc1
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_InstallSoftware.png
Binary files 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 00000000..90147bef
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_InstallingBaseSystem.png
Binary files 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 00000000..4bbec3c6
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_InstallingGRUBprogress.png
Binary files 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 00000000..ef5fe2af
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_MirrorCountry.png
Binary files 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 00000000..bbe538f4
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_NameOfUser.png
Binary files 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 00000000..7bca8a10
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_No.png
Binary files 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 00000000..cb668f15
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_PartitioningMethod.png
Binary files 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 00000000..7d3acf94
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_PartitioningScheme.png
Binary files 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 00000000..58a4a663
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_RootPassword.png
Binary files 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 00000000..43ff7643
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_ScanCD.png
Binary files 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 00000000..f5c045c7
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_SelectDiskToPartition.png
Binary files 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 00000000..b253eb1e
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_SelectYourLocation.png
Binary files 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 00000000..c3cc54e5
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_UnitedKingdom.png
Binary files 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 00000000..58dd466a
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_UseNetMirror.png
Binary files 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 00000000..6be34915
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_UserPassword.png
Binary files 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 00000000..2c84ad22
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_Yes.png
Binary files 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 00000000..7eb0fe2e
--- /dev/null
+++ b/cucumber/features/images/d-i_gui_popcon.png
Binary files differ
diff --git a/cucumber/features/images/d-i_popcon.png b/cucumber/features/images/d-i_popcon.png
deleted file mode 100644
index ed0ba618..00000000
--- a/cucumber/features/images/d-i_popcon.png
+++ /dev/null
Binary files differ
diff --git a/cucumber/features/images/d-i_ArchiveMirror.png b/cucumber/features/images/d-i_text_ArchiveMirror.png
index 7e53f189..7e53f189 100644
--- a/cucumber/features/images/d-i_ArchiveMirror.png
+++ b/cucumber/features/images/d-i_text_ArchiveMirror.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerSelectLangEnglishUK.png b/cucumber/features/images/d-i_text_BritishEnglish.png
index c0da761f..c0da761f 100644
--- a/cucumber/features/images/DebianInstallerSelectLangEnglishUK.png
+++ b/cucumber/features/images/d-i_text_BritishEnglish.png
Binary files differ
diff --git a/cucumber/features/images/d-i_ChooseSoftware.png b/cucumber/features/images/d-i_text_ChooseSoftware.png
index 93447158..93447158 100644
--- a/cucumber/features/images/d-i_ChooseSoftware.png
+++ b/cucumber/features/images/d-i_text_ChooseSoftware.png
Binary files differ
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 00000000..476c8ab7
--- /dev/null
+++ b/cucumber/features/images/d-i_text_Desktop+Gnome.png
Binary files differ
diff --git a/cucumber/features/images/d-i_DesktopTask_No.png b/cucumber/features/images/d-i_text_DesktopTask_No.png
index 6dbf9df4..6dbf9df4 100644
--- a/cucumber/features/images/d-i_DesktopTask_No.png
+++ b/cucumber/features/images/d-i_text_DesktopTask_No.png
Binary files differ
diff --git a/cucumber/features/images/d-i_DesktopTask_Yes.png b/cucumber/features/images/d-i_text_DesktopTask_Yes.png
index 02cbaa5d..02cbaa5d 100644
--- a/cucumber/features/images/d-i_DesktopTask_Yes.png
+++ b/cucumber/features/images/d-i_text_DesktopTask_Yes.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerDomainPrompt.png b/cucumber/features/images/d-i_text_DomainName.png
index d7fca5f8..d7fca5f8 100644
--- a/cucumber/features/images/DebianInstallerDomainPrompt.png
+++ b/cucumber/features/images/d-i_text_DomainName.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerSelectLangEnglish.png b/cucumber/features/images/d-i_text_English.png
index 85f848d5..85f848d5 100644
--- a/cucumber/features/images/DebianInstallerSelectLangEnglish.png
+++ b/cucumber/features/images/d-i_text_English.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerHostnamePrompt.png b/cucumber/features/images/d-i_text_EnterTheHostname.png
index f1325c8d..f1325c8d 100644
--- a/cucumber/features/images/DebianInstallerHostnamePrompt.png
+++ b/cucumber/features/images/d-i_text_EnterTheHostname.png
Binary files differ
diff --git a/cucumber/features/images/d-i_F12BootMenu.png b/cucumber/features/images/d-i_text_F12BootMenu.png
index 67a21856..67a21856 100644
--- a/cucumber/features/images/d-i_F12BootMenu.png
+++ b/cucumber/features/images/d-i_text_F12BootMenu.png
Binary files differ
diff --git a/cucumber/features/images/d-i_FinishPartitioning.png b/cucumber/features/images/d-i_text_FinishPartitioning.png
index 50396500..50396500 100644
--- a/cucumber/features/images/d-i_FinishPartitioning.png
+++ b/cucumber/features/images/d-i_text_FinishPartitioning.png
Binary files differ
diff --git a/cucumber/features/images/d-i_GRUBEnterDev.png b/cucumber/features/images/d-i_text_GRUBEnterDev.png
index 6df484ed..6df484ed 100644
--- a/cucumber/features/images/d-i_GRUBEnterDev.png
+++ b/cucumber/features/images/d-i_text_GRUBEnterDev.png
Binary files differ
diff --git a/cucumber/features/images/d-i_GRUBdev.png b/cucumber/features/images/d-i_text_GRUBdev.png
index 9d554d74..9d554d74 100644
--- a/cucumber/features/images/d-i_GRUBdev.png
+++ b/cucumber/features/images/d-i_text_GRUBdev.png
Binary files differ
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 00000000..5b1d0042
--- /dev/null
+++ b/cucumber/features/images/d-i_text_HttpProxy.png
Binary files differ
diff --git a/cucumber/features/images/d-i_InstallComplete.png b/cucumber/features/images/d-i_text_InstallComplete.png
index a8564464..a8564464 100644
--- a/cucumber/features/images/d-i_InstallComplete.png
+++ b/cucumber/features/images/d-i_text_InstallComplete.png
Binary files differ
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 00000000..80c53023
--- /dev/null
+++ b/cucumber/features/images/d-i_text_InstallGRUB.png
Binary files 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 00000000..b03e369e
--- /dev/null
+++ b/cucumber/features/images/d-i_text_InstallSoftware.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerInstallingBaseSystem.png b/cucumber/features/images/d-i_text_InstallingBaseSystem.png
index 0b9e1c7f..0b9e1c7f 100644
--- a/cucumber/features/images/DebianInstallerInstallingBaseSystem.png
+++ b/cucumber/features/images/d-i_text_InstallingBaseSystem.png
Binary files differ
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 00000000..4cae1548
--- /dev/null
+++ b/cucumber/features/images/d-i_text_InstallingGRUBprogress.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerMirrorCountry.png b/cucumber/features/images/d-i_text_MirrorCountry.png
index 9b4df5ea..9b4df5ea 100644
--- a/cucumber/features/images/DebianInstallerMirrorCountry.png
+++ b/cucumber/features/images/d-i_text_MirrorCountry.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerNameOfUser.png b/cucumber/features/images/d-i_text_NameOfUser.png
index e37c7ec4..e37c7ec4 100644
--- a/cucumber/features/images/DebianInstallerNameOfUser.png
+++ b/cucumber/features/images/d-i_text_NameOfUser.png
Binary files differ
diff --git a/cucumber/features/images/d-i_No.png b/cucumber/features/images/d-i_text_No.png
index 1108addc..1108addc 100644
--- a/cucumber/features/images/d-i_No.png
+++ b/cucumber/features/images/d-i_text_No.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerNoDiskFound.png b/cucumber/features/images/d-i_text_NoDiskFound.png
index 671f52d6..671f52d6 100644
--- a/cucumber/features/images/DebianInstallerNoDiskFound.png
+++ b/cucumber/features/images/d-i_text_NoDiskFound.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerPartitioningMethod.png b/cucumber/features/images/d-i_text_PartitioningMethod.png
index 9e44360e..9e44360e 100644
--- a/cucumber/features/images/DebianInstallerPartitioningMethod.png
+++ b/cucumber/features/images/d-i_text_PartitioningMethod.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerPartitioningScheme.png b/cucumber/features/images/d-i_text_PartitioningScheme.png
index 97105b62..97105b62 100644
--- a/cucumber/features/images/DebianInstallerPartitioningScheme.png
+++ b/cucumber/features/images/d-i_text_PartitioningScheme.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerRootPassword.png b/cucumber/features/images/d-i_text_RootPassword.png
index 27368fd7..27368fd7 100644
--- a/cucumber/features/images/DebianInstallerRootPassword.png
+++ b/cucumber/features/images/d-i_text_RootPassword.png
Binary files differ
diff --git a/cucumber/features/images/d-i_ScanCD.png b/cucumber/features/images/d-i_text_ScanCD.png
index 5790bcce..5790bcce 100644
--- a/cucumber/features/images/d-i_ScanCD.png
+++ b/cucumber/features/images/d-i_text_ScanCD.png
Binary files differ
diff --git a/cucumber/features/images/d-i_SelectBootDev.png b/cucumber/features/images/d-i_text_SelectBootDev.png
index 7abef3ec..7abef3ec 100644
--- a/cucumber/features/images/d-i_SelectBootDev.png
+++ b/cucumber/features/images/d-i_text_SelectBootDev.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerSelectDiskToPartition.png b/cucumber/features/images/d-i_text_SelectDiskToPartition.png
index 1f14bb1a..1f14bb1a 100644
--- a/cucumber/features/images/DebianInstallerSelectDiskToPartition.png
+++ b/cucumber/features/images/d-i_text_SelectDiskToPartition.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerCountrySelection.png b/cucumber/features/images/d-i_text_SelectYourLocation.png
index fe130993..fe130993 100644
--- a/cucumber/features/images/DebianInstallerCountrySelection.png
+++ b/cucumber/features/images/d-i_text_SelectYourLocation.png
Binary files differ
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 00000000..279d2cff
--- /dev/null
+++ b/cucumber/features/images/d-i_text_UnitedKingdom.png
Binary files differ
diff --git a/cucumber/features/images/d-i_UseNetMirror.png b/cucumber/features/images/d-i_text_UseNetMirror.png
index 2b41228b..2b41228b 100644
--- a/cucumber/features/images/d-i_UseNetMirror.png
+++ b/cucumber/features/images/d-i_text_UseNetMirror.png
Binary files differ
diff --git a/cucumber/features/images/DebianInstallerUserPassword.png b/cucumber/features/images/d-i_text_UserPassword.png
index bf9964aa..bf9964aa 100644
--- a/cucumber/features/images/DebianInstallerUserPassword.png
+++ b/cucumber/features/images/d-i_text_UserPassword.png
Binary files differ
diff --git a/cucumber/features/images/d-i_Yes.png b/cucumber/features/images/d-i_text_Yes.png
index 17fab5b9..17fab5b9 100644
--- a/cucumber/features/images/d-i_Yes.png
+++ b/cucumber/features/images/d-i_text_Yes.png
Binary files differ
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 00000000..f1c116a7
--- /dev/null
+++ b/cucumber/features/images/d-i_text_bootmenu_graphical.png
Binary files 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 00000000..487457c2
--- /dev/null
+++ b/cucumber/features/images/d-i_text_popcon.png
Binary files differ
diff --git a/cucumber/features/install.feature b/cucumber/features/install.feature
index 3b71b6c2..85406871 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 fc1bf459..c2082177 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 bd03cebb..69fd238f 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 13e4a5b6..2e064107 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 25c107b4..60432246 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 2e17ae76..53f502e1 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'