[Qa-jenkins-scm] [jenkins.debian.net] 06/10: lvc based off of recent Tails
Holger Levsen
holger at layer-acht.org
Thu Apr 28 19:52:42 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 268339aa08aebba31eba5ab49c79ca5c85c85b56
Author: Philip Hands <phil at hands.com>
Date: Thu Apr 28 18:21:04 2016 +0200
lvc based off of recent Tails
---
README-sikuli-cucumber | 13 ++
bin/lvc/run_test_suite | 17 +--
features/DebianLive/apt.feature | 25 ++--
.../images/DebianInstallerCountrySelection.png | Bin 0 -> 5303 bytes
features/images/DebianInstallerDomainPrompt.png | Bin 0 -> 2225 bytes
features/images/DebianInstallerHostnamePrompt.png | Bin 0 -> 5643 bytes
features/images/DebianInstallerHttpProxy.png | Bin 0 -> 485 bytes
.../images/DebianInstallerInstallingBaseSystem.png | Bin 0 -> 3554 bytes
features/images/DebianInstallerMirrorCountry.png | Bin 0 -> 3769 bytes
features/images/DebianInstallerNameOfUser.png | Bin 0 -> 3792 bytes
features/images/DebianInstallerNoDiskFound.png | Bin 0 -> 4005 bytes
.../images/DebianInstallerPartitioningMethod.png | Bin 0 -> 13953 bytes
.../images/DebianInstallerPartitioningScheme.png | Bin 0 -> 2879 bytes
features/images/DebianInstallerRootPassword.png | Bin 0 -> 3226 bytes
.../DebianInstallerSelectDiskToPartition.png | Bin 0 -> 5403 bytes
.../images/DebianInstallerSelectLangEnglish.png | Bin 0 -> 7229 bytes
.../images/DebianInstallerSelectLangEnglishUK.png | Bin 0 -> 4853 bytes
features/images/DebianInstallerUserPassword.png | Bin 0 -> 4892 bytes
features/images/DebianLoginPromptVT.png | Bin 0 -> 7466 bytes
features/images/d-i8_bootsplash.png | Bin 0 -> 9930 bytes
features/images/d-i_ArchiveMirror.png | Bin 0 -> 2908 bytes
features/images/d-i_ChooseSoftware.png | Bin 0 -> 4204 bytes
features/images/d-i_DesktopTask_No.png | Bin 0 -> 7161 bytes
features/images/d-i_DesktopTask_Yes.png | Bin 0 -> 4152 bytes
features/images/d-i_F12BootMenu.png | Bin 0 -> 482 bytes
features/images/d-i_FinishPartitioning.png | Bin 0 -> 8734 bytes
features/images/d-i_GRUBEnterDev.png | Bin 0 -> 2490 bytes
features/images/d-i_GRUB_Debian.png | Bin 0 -> 387 bytes
features/images/d-i_GRUBdev.png | Bin 0 -> 1765 bytes
features/images/d-i_HttpProxy.png | Bin 0 -> 5324 bytes
features/images/d-i_InstallComplete.png | Bin 0 -> 2740 bytes
features/images/d-i_InstallGRUB.png | Bin 0 -> 6367 bytes
features/images/d-i_No.png | Bin 0 -> 995 bytes
features/images/d-i_ScanCD.png | Bin 0 -> 3216 bytes
features/images/d-i_SelectBootDev.png | Bin 0 -> 559 bytes
features/images/d-i_UseNetMirror.png | Bin 0 -> 2975 bytes
features/images/d-i_Yes.png | Bin 0 -> 1163 bytes
features/images/d-i_popcon.png | Bin 0 -> 3894 bytes
features/step_definitions/common_steps.rb | 165 +++++++++++++++++++--
features/step_definitions/snapshots.rb | 46 ++++++
features/support/config.rb | 12 +-
features/support/helpers/exec_helper.rb | 34 +++--
features/support/hooks.rb | 2 +-
job-cfg/lvc.yaml | 19 ++-
update_jdn.sh | 30 +++-
45 files changed, 296 insertions(+), 67 deletions(-)
diff --git a/README-sikuli-cucumber b/README-sikuli-cucumber
new file mode 100644
index 0000000..24d90aa
--- /dev/null
+++ b/README-sikuli-cucumber
@@ -0,0 +1,13 @@
+Key names:
+
+ http://doc.sikuli.org/keys.html
+
+Running the thing by hand:
+
+ ./bin/lvc/run_test_suite --view --iso /var/lib/libvirt/images/debian-8.3.0-amd64-i386-netinst.iso --old-iso /var/lib/libvirt/images/debian-8.3.0-amd64-i386-netinst.iso DebianLive/apt.feature
+
+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.
diff --git a/bin/lvc/run_test_suite b/bin/lvc/run_test_suite
index 154a4a6..5b40c38 100755
--- a/bin/lvc/run_test_suite
+++ b/bin/lvc/run_test_suite
@@ -264,20 +264,13 @@ fi
export SIKULI_HOME="/usr/share/java"
export SIKULI_IMAGE_PATH="/srv/jenkins/features/images/"
export RUBYLIB="/srv/jenkins"
-export FEATURE_PATH="/srv/jenkins/features"
export VM_XML_PATH="/srv/jenkins/features/domains"
export DISPLAY=${TARGET_DISPLAY}
-CUCUMBEROPTS="--verbose --backtrace --expand"
check_dependencies cucumber
-set -x
+# cludge ruby to stop buffering output
+RUBY_STDOUT_SYNC=$TMPDIR/.stdout-sync.rb
+echo STDOUT.sync = true > $RUBY_STDOUT_SYNC
+export RUBYOPT="-r $RUBY_STDOUT_SYNC"
-if [ -z "${*}" ]; then
- cucumber $CUCUMBEROPTS --format ExtraHooks::Pretty $FEATURE_PATH
-else
- FEATURES=""
- for f in ${*} ; do
- FEATURES="$FEATURES $FEATURE_PATH/$f"
- done
- cucumber $CUCUMBEROPTS --format ExtraHooks::Pretty $FEATURE_PATH/step_definitions $FEATURE_PATH/support $FEATURES
-fi
+cucumber ${@}
diff --git a/features/DebianLive/apt.feature b/features/DebianLive/apt.feature
index 80f0cdd..3b71b6c 100644
--- a/features/DebianLive/apt.feature
+++ b/features/DebianLive/apt.feature
@@ -1,19 +1,14 @@
@product
-Feature: Installing packages through APT
- As a Tails user
- I should be able to install packages using APT
+Feature: Doing a trivial d-i install
+ As a normal user
+ I should be able to do a text-mode install
- Background:
- Given a computer
- And I capture all network traffic
+ Scenario Outline: Install Debian and boot to login prompt
+ Given I have installed <type> Debian
And I start the computer
- And the computer boots DebianLive
- And I save the state so the background can be restored next scenario
-
- Scenario: APT sources are configured correctly
- Then the only hosts in APT sources are "ftp.us.debian.org,http.debian.net,ftp.debian.org,security.debian.org"
-
- Scenario: Install packages using apt-get
- When I update APT using apt-get
- Then I should be able to install a package using apt-get
+ Then I wait for a Login Prompt
+ Examples:
+ | type |
+ | Minimal |
+ | Gnome Desktop |
diff --git a/features/images/DebianInstallerCountrySelection.png b/features/images/DebianInstallerCountrySelection.png
new file mode 100644
index 0000000..fe13099
Binary files /dev/null and b/features/images/DebianInstallerCountrySelection.png differ
diff --git a/features/images/DebianInstallerDomainPrompt.png b/features/images/DebianInstallerDomainPrompt.png
new file mode 100644
index 0000000..d7fca5f
Binary files /dev/null and b/features/images/DebianInstallerDomainPrompt.png differ
diff --git a/features/images/DebianInstallerHostnamePrompt.png b/features/images/DebianInstallerHostnamePrompt.png
new file mode 100644
index 0000000..f1325c8
Binary files /dev/null and b/features/images/DebianInstallerHostnamePrompt.png differ
diff --git a/features/images/DebianInstallerHttpProxy.png b/features/images/DebianInstallerHttpProxy.png
new file mode 100644
index 0000000..04b3e13
Binary files /dev/null and b/features/images/DebianInstallerHttpProxy.png differ
diff --git a/features/images/DebianInstallerInstallingBaseSystem.png b/features/images/DebianInstallerInstallingBaseSystem.png
new file mode 100644
index 0000000..0b9e1c7
Binary files /dev/null and b/features/images/DebianInstallerInstallingBaseSystem.png differ
diff --git a/features/images/DebianInstallerMirrorCountry.png b/features/images/DebianInstallerMirrorCountry.png
new file mode 100644
index 0000000..9b4df5e
Binary files /dev/null and b/features/images/DebianInstallerMirrorCountry.png differ
diff --git a/features/images/DebianInstallerNameOfUser.png b/features/images/DebianInstallerNameOfUser.png
new file mode 100644
index 0000000..e37c7ec
Binary files /dev/null and b/features/images/DebianInstallerNameOfUser.png differ
diff --git a/features/images/DebianInstallerNoDiskFound.png b/features/images/DebianInstallerNoDiskFound.png
new file mode 100644
index 0000000..671f52d
Binary files /dev/null and b/features/images/DebianInstallerNoDiskFound.png differ
diff --git a/features/images/DebianInstallerPartitioningMethod.png b/features/images/DebianInstallerPartitioningMethod.png
new file mode 100644
index 0000000..9e44360
Binary files /dev/null and b/features/images/DebianInstallerPartitioningMethod.png differ
diff --git a/features/images/DebianInstallerPartitioningScheme.png b/features/images/DebianInstallerPartitioningScheme.png
new file mode 100644
index 0000000..97105b6
Binary files /dev/null and b/features/images/DebianInstallerPartitioningScheme.png differ
diff --git a/features/images/DebianInstallerRootPassword.png b/features/images/DebianInstallerRootPassword.png
new file mode 100644
index 0000000..27368fd
Binary files /dev/null and b/features/images/DebianInstallerRootPassword.png differ
diff --git a/features/images/DebianInstallerSelectDiskToPartition.png b/features/images/DebianInstallerSelectDiskToPartition.png
new file mode 100644
index 0000000..1f14bb1
Binary files /dev/null and b/features/images/DebianInstallerSelectDiskToPartition.png differ
diff --git a/features/images/DebianInstallerSelectLangEnglish.png b/features/images/DebianInstallerSelectLangEnglish.png
new file mode 100644
index 0000000..85f848d
Binary files /dev/null and b/features/images/DebianInstallerSelectLangEnglish.png differ
diff --git a/features/images/DebianInstallerSelectLangEnglishUK.png b/features/images/DebianInstallerSelectLangEnglishUK.png
new file mode 100644
index 0000000..c0da761
Binary files /dev/null and b/features/images/DebianInstallerSelectLangEnglishUK.png differ
diff --git a/features/images/DebianInstallerUserPassword.png b/features/images/DebianInstallerUserPassword.png
new file mode 100644
index 0000000..bf9964a
Binary files /dev/null and b/features/images/DebianInstallerUserPassword.png differ
diff --git a/features/images/DebianLoginPromptVT.png b/features/images/DebianLoginPromptVT.png
new file mode 100644
index 0000000..ec26782
Binary files /dev/null and b/features/images/DebianLoginPromptVT.png differ
diff --git a/features/images/d-i8_bootsplash.png b/features/images/d-i8_bootsplash.png
new file mode 100644
index 0000000..086c65c
Binary files /dev/null and b/features/images/d-i8_bootsplash.png differ
diff --git a/features/images/d-i_ArchiveMirror.png b/features/images/d-i_ArchiveMirror.png
new file mode 100644
index 0000000..7e53f18
Binary files /dev/null and b/features/images/d-i_ArchiveMirror.png differ
diff --git a/features/images/d-i_ChooseSoftware.png b/features/images/d-i_ChooseSoftware.png
new file mode 100644
index 0000000..9344715
Binary files /dev/null and b/features/images/d-i_ChooseSoftware.png differ
diff --git a/features/images/d-i_DesktopTask_No.png b/features/images/d-i_DesktopTask_No.png
new file mode 100644
index 0000000..6dbf9df
Binary files /dev/null and b/features/images/d-i_DesktopTask_No.png differ
diff --git a/features/images/d-i_DesktopTask_Yes.png b/features/images/d-i_DesktopTask_Yes.png
new file mode 100644
index 0000000..02cbaa5
Binary files /dev/null and b/features/images/d-i_DesktopTask_Yes.png differ
diff --git a/features/images/d-i_F12BootMenu.png b/features/images/d-i_F12BootMenu.png
new file mode 100644
index 0000000..67a2185
Binary files /dev/null and b/features/images/d-i_F12BootMenu.png differ
diff --git a/features/images/d-i_FinishPartitioning.png b/features/images/d-i_FinishPartitioning.png
new file mode 100644
index 0000000..5039650
Binary files /dev/null and b/features/images/d-i_FinishPartitioning.png differ
diff --git a/features/images/d-i_GRUBEnterDev.png b/features/images/d-i_GRUBEnterDev.png
new file mode 100644
index 0000000..6df484e
Binary files /dev/null and b/features/images/d-i_GRUBEnterDev.png differ
diff --git a/features/images/d-i_GRUB_Debian.png b/features/images/d-i_GRUB_Debian.png
new file mode 100644
index 0000000..3b67cfb
Binary files /dev/null and b/features/images/d-i_GRUB_Debian.png differ
diff --git a/features/images/d-i_GRUBdev.png b/features/images/d-i_GRUBdev.png
new file mode 100644
index 0000000..9d554d7
Binary files /dev/null and b/features/images/d-i_GRUBdev.png differ
diff --git a/features/images/d-i_HttpProxy.png b/features/images/d-i_HttpProxy.png
new file mode 100644
index 0000000..4163a5b
Binary files /dev/null and b/features/images/d-i_HttpProxy.png differ
diff --git a/features/images/d-i_InstallComplete.png b/features/images/d-i_InstallComplete.png
new file mode 100644
index 0000000..a856446
Binary files /dev/null and b/features/images/d-i_InstallComplete.png differ
diff --git a/features/images/d-i_InstallGRUB.png b/features/images/d-i_InstallGRUB.png
new file mode 100644
index 0000000..e491fbd
Binary files /dev/null and b/features/images/d-i_InstallGRUB.png differ
diff --git a/features/images/d-i_No.png b/features/images/d-i_No.png
new file mode 100644
index 0000000..1108add
Binary files /dev/null and b/features/images/d-i_No.png differ
diff --git a/features/images/d-i_ScanCD.png b/features/images/d-i_ScanCD.png
new file mode 100644
index 0000000..5790bcc
Binary files /dev/null and b/features/images/d-i_ScanCD.png differ
diff --git a/features/images/d-i_SelectBootDev.png b/features/images/d-i_SelectBootDev.png
new file mode 100644
index 0000000..7abef3e
Binary files /dev/null and b/features/images/d-i_SelectBootDev.png differ
diff --git a/features/images/d-i_UseNetMirror.png b/features/images/d-i_UseNetMirror.png
new file mode 100644
index 0000000..2b41228
Binary files /dev/null and b/features/images/d-i_UseNetMirror.png differ
diff --git a/features/images/d-i_Yes.png b/features/images/d-i_Yes.png
new file mode 100644
index 0000000..17fab5b
Binary files /dev/null and b/features/images/d-i_Yes.png differ
diff --git a/features/images/d-i_popcon.png b/features/images/d-i_popcon.png
new file mode 100644
index 0000000..ed0ba61
Binary files /dev/null and b/features/images/d-i_popcon.png differ
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index d7097a0..a04ca2c 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -257,15 +257,157 @@ When /^I destroy the computer$/ do
$vm.destroy_and_undefine
end
-Given /^the computer (re)?boots DebianLive(|\d+)$/ do |reboot,version|
- next if @skip_steps_while_restoring_background
+Given /^the computer (re)?boots DebianInstaller(|\d+)$/ do |reboot,version|
+
+ 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}" +
+ Sikuli::Key.ENTER)
+ $vm.wait_until_remote_shell_is_up
+end
+
+Given /^I select British English$/ do
+ @screen.wait("DebianInstallerSelectLangEnglish.png", 30)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("DebianInstallerCountrySelection.png", 10)
+ @screen.type(Sikuli::Key.UP)
+ @screen.waitVanish("DebianInstallerCountrySelection.png", 10)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("DebianInstallerSelectLangEnglishUK.png", 10)
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+Given /^I accept the hostname, using "([^"]*)" as the domain$/ do |domain|
+ @screen.wait("DebianInstallerHostnamePrompt.png", 5*60)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("DebianInstallerDomainPrompt.png", 10)
+ @screen.type(domain + Sikuli::Key.ENTER)
+ @screen.waitVanish("DebianInstallerDomainPrompt.png", 10)
+end
+
+Given /^I set the root password to "([^"]*)"$/ do |rootpw|
+# Root Password, twice
+ @screen.wait("DebianInstallerRootPassword.png", 30)
+ @screen.type(rootpw + Sikuli::Key.ENTER)
+ @screen.waitVanish("DebianInstallerRootPassword.png", 10)
+ @screen.type(rootpw + Sikuli::Key.ENTER)
+end
+
+Given /^I set the password for "([^"]*)" to be "([^"]*)"$/ do |fullname,password|
+# Username, and password twice
+ @screen.wait("DebianInstallerNameOfUser.png", 10)
+ @screen.type(fullname + Sikuli::Key.ENTER)
+ @screen.waitVanish("DebianInstallerNameOfUser.png", 10)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("DebianInstallerUserPassword.png", 10)
+ @screen.type(password + Sikuli::Key.ENTER)
+ @screen.waitVanish("DebianInstallerUserPassword.png", 10)
+ @screen.type(password + Sikuli::Key.ENTER)
+end
+
+ #@screen.wait("DebianInstallerNoDiskFound.png", 60)
+
+Given /^I select full-disk, single-filesystem partitioning$/ do
+ @screen.wait("DebianInstallerPartitioningMethod.png", 60)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("DebianInstallerSelectDiskToPartition.png", 10)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("DebianInstallerPartitioningScheme.png", 10)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("d-i_FinishPartitioning.png", 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.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)
+end
+
+Given /^I accept the default mirror$/ do
+ @screen.wait("DebianInstallerMirrorCountry.png", 10 * 60)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("d-i_ArchiveMirror.png", 5)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("d-i_HttpProxy.png", 5)
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+Given /^I neglect to scan more CDs$/ do
+ @screen.wait("d-i_ScanCD.png", 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.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)
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+Given /^we reach the Tasksel prompt$/ do
+ @screen.wait("d-i_ChooseSoftware.png", 5 * 60)
+end
+
+Given /^I hit ENTER$/ do
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+Given /^I select the Desktop task$/ do
+ @screen.wait("d-i_ChooseSoftware.png", 10)
+ @screen.type(Sikuli::Key.SPACE)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.type(Sikuli::Key.SPACE)
+ @screen.wait("d-i_DesktopTask_Yes.png", 10)
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+Given /^I install GRUB$/ do
+ #@screen.wait("d-i_InstallGRUB.png", 80 * 60)
+ @screen.wait("Install the GRUB", 80 * 60)
+ @screen.type(Sikuli::Key.ENTER)
+ @screen.wait("d-i_GRUBEnterDev.png", 10 * 60)
+ @screen.type(Sikuli::Key.DOWN)
+ @screen.wait("d-i_GRUBdev.png", 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)
+ @screen.type(Sikuli::Key.ENTER)
+end
+
+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
+ @screen.wait("amnesia", 60)
+end
def bootsplash
case @os_loader
when "UEFI"
'TailsBootSplashUEFI.png'
else
- 'TailsBootSplash.png'
+ 'd-i8_bootsplash.png'
end
end
@@ -274,15 +416,16 @@ def bootsplash_tab_msg
when "UEFI"
'TailsBootSplashTabMsgUEFI.png'
else
- if reboot
- bootsplash = 'TailsBootSplashPostReset.png'
- bootsplash_tab_msg = 'TailsBootSplashTabMsgPostReset.png'
- boot_timeout = 120
- else
- bootsplash = "DebianLive#{version}BootSplash.png"
- bootsplash_tab_msg = "DebianLive#{version}BootSplashTabMsg.png"
+ #if reboot
+ # bootsplash = 'TailsBootSplashPostReset.png'
+ # bootsplash_tab_msg = 'TailsBootSplashTabMsgPostReset.png'
+ # boot_timeout = 120
+ #else
+ #bootsplash = "DebianLive#{version}BootSplash.png"
+ bootsplash = "DebianLiveBootSplash.png"
+ bootsplash_tab_msg = "DebianLiveBootSplashTabMsg.png"
boot_timeout = 30
- end
+ #end
end
end
diff --git a/features/step_definitions/snapshots.rb b/features/step_definitions/snapshots.rb
index 0e9ae3b..13e4a5b 100644
--- a/features/step_definitions/snapshots.rb
+++ b/features/step_definitions/snapshots.rb
@@ -1,5 +1,51 @@
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',
+ :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',
+ ],
+ },
+
+ 'debian-minimal-install' => {
+ :description => "I have installed Minimal Debian",
+ :parent_checkpoint => 'boot-d-i-to-tasksel',
+ :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"',
+ ],
+ },
+
+ 'debian-gnome-install' => {
+ :description => "I have installed Gnome Desktop Debian",
+ :parent_checkpoint => 'boot-d-i-to-tasksel',
+ :steps => [
+ 'I select the Desktop task',
+ '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"',
+ ],
+ },
+
'tails-greeter' => {
:description => "I have started Tails from DVD without network and stopped at Tails Greeter's login screen",
:parent_checkpoint => nil,
diff --git a/features/support/config.rb b/features/support/config.rb
index 9db1592..607969a 100644
--- a/features/support/config.rb
+++ b/features/support/config.rb
@@ -54,9 +54,9 @@ DEBUG_LOG_PSEUDO_FIFO = "#{$config["TMPDIR"]}/debug_log_pseudo_fifo"
DISPLAY = ENV['DISPLAY']
GIT_DIR = ENV['PWD']
KEEP_SNAPSHOTS = !ENV['KEEP_SNAPSHOTS'].nil?
-LIVE_USER = cmd_helper(". config/chroot_local-includes/etc/live/config.d/username.conf; echo ${LIVE_USERNAME}").chomp
-TAILS_ISO = ENV['TAILS_ISO']
-OLD_TAILS_ISO = ENV['OLD_TAILS_ISO'] || TAILS_ISO
+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'] + "/run-" +
@@ -76,9 +76,9 @@ end
# Constants that are statically initialized.
CONFIGURED_KEYSERVER_HOSTNAME = 'hkps.pool.sks-keyservers.net'
-LIBVIRT_DOMAIN_NAME = "TailsToaster"
+LIBVIRT_DOMAIN_NAME = "DebianToaster"
LIBVIRT_DOMAIN_UUID = "203552d5-819c-41f3-800e-2c8ef2545404"
-LIBVIRT_NETWORK_NAME = "TailsToasterNet"
+LIBVIRT_NETWORK_NAME = "DebianToasterNet"
LIBVIRT_NETWORK_UUID = "f2305af3-2a64-4f16-afe6-b9dbf02a597e"
MISC_FILES_DIR = "#{Dir.pwd}/features/misc_files"
SERVICES_EXPECTED_ON_ALL_IFACES =
@@ -104,5 +104,5 @@ TOR_AUTHORITIES =
]
VM_XML_PATH = "#{Dir.pwd}/features/domains"
-TAILS_SIGNING_KEY = cmd_helper(". #{Dir.pwd}/config/amnesia; echo ${AMNESIA_DEV_KEYID}").tr(' ', '').chomp
+#TAILS_SIGNING_KEY = cmd_helper(". #{Dir.pwd}/config/amnesia; echo ${AMNESIA_DEV_KEYID}").tr(' ', '').chomp
TAILS_DEBIAN_REPO_KEY = "221F9A3C6FA3E09E182E060BC7988EA7A358D82E"
diff --git a/features/support/helpers/exec_helper.rb b/features/support/helpers/exec_helper.rb
index 42f6532..14e1226 100644
--- a/features/support/helpers/exec_helper.rb
+++ b/features/support/helpers/exec_helper.rb
@@ -1,5 +1,6 @@
require 'json'
require 'socket'
+require 'io/wait'
class VMCommand
@@ -12,8 +13,9 @@ class VMCommand
def VMCommand.wait_until_remote_shell_is_up(vm, timeout = 90)
try_for(timeout, :msg => "Remote shell seems to be down") do
- Timeout::timeout(3) do
- VMCommand.execute(vm, "echo 'hello?'")
+ sleep(20)
+ Timeout::timeout(10) do
+ VMCommand.execute(vm, "echo 'true'")
end
end
end
@@ -34,20 +36,26 @@ class VMCommand
socket = TCPSocket.new("127.0.0.1", vm.get_remote_shell_port)
debug_log("#{type}ing as #{options[:user]}: #{cmd}")
begin
- socket.puts(JSON.dump([type, options[:user], cmd]))
- s = socket.readline(sep = "\0").chomp("\0")
+ #socket.puts(JSON.dump([type, options[:user], cmd]))
+ socket.puts( "\n")
+ sleep(1)
+ socket.puts( "\003")
+ sleep(1)
+ socket.puts( cmd + "\n")
+ sleep(1)
+ while socket.ready?
+ s = socket.readline(sep = "\n").chomp("\n")
+ debug_log("#{type} read: #{s}") if not(options[:spawn])
+ if ('true' == s) then
+ break
+ end
+ end
ensure
socket.close
end
- debug_log("#{type} returned: #{s}") if not(options[:spawn])
- begin
- return JSON.load(s)
- rescue JSON::ParserError
- # The server often returns something unparsable for the very
- # first execute() command issued after a VM start/restore
- # (generally from wait_until_remote_shell_is_up()) presumably
- # because the TCP -> serial link isn't properly setup yet. All
- # will be well after that initial hickup, so we just retry.
+ if ('true' == s)
+ return true
+ else
return VMCommand.execute(vm, cmd, options)
end
end
diff --git a/features/support/hooks.rb b/features/support/hooks.rb
index be8a023..b3bdece 100644
--- a/features/support/hooks.rb
+++ b/features/support/hooks.rb
@@ -129,7 +129,7 @@ end
BeforeFeature('@product') do |feature|
if TAILS_ISO.nil?
- raise "No Tails ISO image specified, and none could be found in the " +
+ raise "No ISO image specified, and none could be found in the " +
"current directory"
end
if File.exist?(TAILS_ISO)
diff --git a/job-cfg/lvc.yaml b/job-cfg/lvc.yaml
index b5b16f6..ba1fa27 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: '*.webm, {my_pngs}'
+ artifacts: 'run-*/*.mkv, {my_pngs}'
latest-only: false
- image-gallery:
- title: '{my_title}'
@@ -40,7 +40,7 @@
wrappers:
- live-screenshot
builders:
- - shell: 'rm $WORKSPACE/*.png -f >/dev/null; /srv/jenkins/bin/lvc/run_test_suite {my_params}'
+ - shell: 'rm $WORKSPACE/*.png $WORKSPACE/*.mvk -f >/dev/null; /srv/jenkins/bin/lvc/run_test_suite {my_params}'
triggers:
- timed: '{my_time}'
@@ -48,13 +48,17 @@
defaults: lvc
name: '{name}_debian-live_{distro}_{flavour}_apt'
+- job-template:
+ defaults: lvc
+ name: '{name}_debian-installer_{distro}_{flavour}_apt'
+
- project:
name: lvc
my_title: '{dist_name} {flav_name}'
my_time: '23 45 31 12 *'
- my_pngs: 'apt-*.png'
+ my_pngs: 'run-*/*.png'
my_description: 'Work in progress...'
- my_params: '--capture lvc_debian-live_{distro}_{flavour}_apt.webm --tmpdir $WORKSPACE --iso /srv/live-build/results/{distro}_{flavour}_live_amd64.iso DebianLive/apt.feature'
+ 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'
jobs:
- '{name}_debian-live_{distro}_{flavour}_apt':
distro:
@@ -79,10 +83,9 @@
- 'xfce': {flav_name: 'Xfce Desktop'}
my_iso: '/srv/live-build/results/{distro}_{flavour}_live_amd64.iso'
- - '{name}_debian-live_{distro}_{flavour}_apt':
+ - '{name}_debian-installer_{distro}_{flavour}_apt':
distro:
- - 'wheezy': {dist_name: 'Debian Live 7'}
+ - 'jessie': {dist_name: 'Debian-Installer 8'}
flavour:
- - 'gnome-desktop': {flav_name: 'GNOME desktop'}
- 'standard': {flav_name: 'standard'}
- my_params: '--capture lvc_debian-live_{distro}_{flavour}_apt.webm --tmpdir $WORKSPACE --iso /var/lib/jenkins/debian-live-7.7.0-amd64-{flavour}.iso DebianLive/apt.feature'
+ 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'
diff --git a/update_jdn.sh b/update_jdn.sh
index 130524b..ecb2d19 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -57,11 +57,17 @@ if ! getent passwd jenkins-adm > /dev/null ; then
sudo adduser --system --shell /bin/bash --no-create-home --ingroup jenkins-adm --disabled-login --no-create-home jenkins-adm
sudo usermod -G jenkins jenkins-adm
fi
-for user in helmut holger mattia lunar philh ; do
+for user in helmut holger mattia lunar philh phil ; do
if [ "$user" = "lunar" ] && [ "$HOSTNAME" != "jenkins" ] ; then
# lunar only wants to configure jekyll
continue
fi
+ if [ "$user" = "phil" ] && [ "$HOSTNAME" != "jenkins-test-vm" ] ; then
+ # phil only wants to test stuff
+ sudo adduser $user libvirt
+ sudo adduser $user libvirt-qemu
+ continue
+ fi
if [ "$user" = "philh" ] && [ "$HOSTNAME" != "jenkins-test-vm" ] ; then
# philh only wants to test stuff
continue
@@ -196,10 +202,32 @@ if [ -f /etc/debian_version ] ; then
"
case $HOSTNAME in
jenkins|jenkins-test-vm|profitbricks-build?-amd64) DEBS="$DEBS
+ cucumber
+ tesseract-ocr
+ i18nspector
+ libav-tools
+ libsikuli-script-java
+ libvirt-dev
+ ovmf
+ python-jabberbot
+ python-potr
+ ruby-guestfs
+ ruby-libvirt
+ ruby-net-irc
+ ruby-packetfu
+ ruby-rb-inotify
+ ruby-rjb
+ ruby-test-unit
+ tcpdump
+ unclutter
+ virt-viewer
+ xvfb
+ x11vnc
libvirt-bin
python3-yaml
postfix-pcre
squid3"
+ # make sure that nested KVM is enabled (see whist:/etc/modprobe.d/kvm-intel-nested.conf)
;;
*) ;;
esac
--
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