Commit 2df98e50 authored by Harald Sitter's avatar Harald Sitter

add testing support for unstable/calamares (not passing presently)

parent f62dec15
env.DIST = 'xenial'
env.TYPE = 'user'
env.TYPE = params.TYPE
env.PWD_BIND = '/workspace'
cleanNode('master') {
......
......@@ -21,8 +21,9 @@
require 'fileutils'
ISO_URL = 'http://files.kde.org/neon/images/neon-useredition/current/neon-useredition-current.iso.zsync'.freeze
SIG_URL = 'http://files.kde.org/neon/images/neon-useredition/current/neon-useredition-current.iso.sig'.freeze
TYPE = ENV.fetch('TYPE')
ISO_URL = "http://files.kde.org/neon/images/neon-#{TYPE}/current/neon-#{TYPE}-current.iso.zsync".freeze
SIG_URL = "http://files.kde.org/neon/images/neon-#{TYPE}/current/neon-#{TYPE}-current.iso.sig".freeze
GPG_KEY = '348C 8651 2066 33FD 983A 8FC4 DEAC EA00 075E 1D76'.freeze
if File.exist?('incoming.iso')
......
......@@ -34,7 +34,11 @@ require $dist;
testapi::set_distribution(distribution_neon->new());
if (testapi::get_var("INSTALLATION")) {
autotest::loadtest "tests/install_ubiquity.pm";
my %test = (
'devedition-gitunstable' => "tests/install_calamares.pm",
'' => "tests/install_ubiquity.pm"
);
autotest::loadtest ($test{$ENV{TYPE}} || $test{''})
} elsif (testapi::get_var("TESTS_TO_RUN")) {
for my $testpath (testapi::get_var("TESTS_TO_RUN")) {
autotest::loadtest $testpath;
......
{
"area": [
{
"type": "match",
"xpos": 290,
"ypos": 140,
"width": 640,
"height": 470,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-disk-erase-selected",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 300,
"ypos": 186,
"width": 533,
"height": 44,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-disk-erase",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 290,
"ypos": 140,
"width": 640,
"height": 470,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-disk",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 0,
"ypos": 0,
"width": 128,
"height": 128,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-icon",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 293,
"ypos": 149,
"width": 641,
"height": 471,
"match": 90
}
],
"properties": [],
"tags": [
"calamares-installer-keyboard",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 747,
"ypos": 621,
"width": 84,
"height": 28,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-next",
"ENV-DISTRI-neon"
]
}
calamares-installer-welcome.png
\ No newline at end of file
{
"area": [
{
"type": "match",
"xpos": 290,
"ypos": 140,
"width": 640,
"height": 470,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-restart",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 290,
"ypos": 140,
"width": 640,
"height": 470,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-show",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 290,
"ypos": 140,
"width": 640,
"height": 470,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-summary",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 295,
"ypos": 141,
"width": 640,
"height": 476,
"match": 75
}
],
"properties": [],
"tags": [
"calamares-installer-timezone",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 292,
"ypos": 142,
"width": 640,
"height": 261,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-user-user",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 292,
"ypos": 142,
"width": 640,
"height": 261,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-user-user",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 290,
"ypos": 140,
"width": 640,
"height": 470,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-user",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"type": "match",
"xpos": 98,
"ypos": 137,
"width": 841,
"height": 518,
"match": 95
}
],
"properties": [],
"tags": [
"calamares-installer-welcome",
"ENV-DISTRI-neon"
]
}
# Copyright (C) 2016-2017 Harald Sitter <sitter@kde.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License or (at your option) version 3 or any later version
# accepted by the membership of KDE e.V. (or its successor approved
# by the membership of KDE e.V.), which shall act as a proxy
# defined in Section 14 of version 3 of the license.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use base "basetest";
use strict;
use testapi;
sub run {
# Divert installation data to live data.
my $user = $testapi::username;
my $password = $testapi::password;
$testapi::username = 'neon';
$testapi::password = '';
# wait for bootloader to appear
assert_screen 'bootloader', 30;
# wait for the desktop to appear
assert_screen 'live-desktop', 180;
wait_idle; # Make sure system has settled down a bit.
# Installer
assert_and_click "calamares-installer-icon";
assert_screen "calamares-installer-welcome", 30;
assert_and_click "calamares-installer-next";
# Timezone has 75% fuzzyness as timezone is geoip'd so its fairly divergent.
# Also, starting here only the top section of the window gets matched as
# the bottom part with the buttons now has a progressbar and status
# text which is non-deterministic.
# NB: we give way more leeway on the new needle appearing as disk IO can
# cause quite a bit of slowdown and ubiquity's transition policy is
# fairly weird when moving away from the disk page.
assert_screen "calamares-installer-timezone", 60;
assert_and_click "calamares-installer-next";
assert_screen "calamares-installer-keyboard", 16;
assert_and_click "calamares-installer-next";
assert_screen "calamares-installer-disk", 16;
assert_and_click "calamares-installer-disk-erase";
assert_screen "calamares-installer-disk-erase-selected", 16;
assert_and_click "calamares-installer-next";
assert_screen "calamares-installer-user", 16;
type_string $user;
assert_screen "calamares-installer-user-user", 16;
send_key "tab", 1; # username field
send_key "tab", 1; # hostname field
send_key "tab", 1; # 1st password field
type_string $password;
send_key "tab", 1; # 2nd password field
type_string $password;
# all fields filled (not matching hostname field)
assert_screen "calamares-installer-user-complete", 16;
assert_and_click "calamares-installer-next";
assert_screen "calamares-installer-summary", 16;
assert_and_click "calamares-installer-next";
assert_screen "calamares-installer-show", 16;
# Let install finish and restart
assert_screen "calamares-installer-restart", 640;
assert_and_click "calamares-installer-restart-now";
assert_screen "live-remove-medium", 60;
send_key "ret";
reset_consoles;
# Eventually we should end up in sddm
assert_screen 'sddm', 180;
# Set instalation data.
$testapi::username = $user;
$testapi::password = $password;
}
sub test_flags {
# without anything - rollback to 'lastgood' snapshot if failed
# 'fatal' - whole test suite is in danger if this fails
# 'milestone' - after this test succeeds, update 'lastgood'
# 'important' - if this fails, set the overall state to 'fail'
return { important => 1 };
}
sub post_fail_hook {
my ($self) = shift;
$self->SUPER::post_fail_hook;
select_console 'x11';
ensure_installed 'curl';
select_console 'log-console';
# Uploads end up in wok/ulogs/
assert_script_run 'journalctl --no-pager -b 0 > /tmp/journal.txt';
upload_logs '/tmp/journal.txt';
assert_script_sudo 'tar cfJ /tmp/installer.tar.xz /var/log/installer';
upload_logs '/tmp/installer.tar.xz';
}
1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment