On 14/01/16 07:55, Shyukri Shyukriev wrote:
> Version: 4.1452703705.308dacd-826.1 from devel:openQA repo, Host system
> is Leap 42.1
>
>
> sudo /usr/share/openqa/script/client isos post \\n
> ISO=obs-server.x86_64-2.6.7-Build1.11.install.iso \\n DISTRI=obs
> \\n VERSION=2.6.7 \\n FLAVOR=ISO \\n ARCH=x86_64
> \\n BUILD=11
> { count => 1, ids => [17] }
>
> Afterwards it fails. Here are the logs from webUI:
> vars.json:
> {
> "ARCH" : "x86_64",
> "ASSETDIR" : "/var/lib/openqa/share/factory",
> "BACKEND" : "qemu",
> "BUILD" : "11",
> "CASEDIR" : "/var/lib/openqa/share/tests/obs",
> "DESKTOP" : "textmode",
> "DISTRI" : "obs",
> "FLAVOR" : "ISO",
> "HOST" : "localhost",
> "ISO" :
> "/var/lib/openqa/share/factory/iso/obs-server.x86_64-2.6.7-Build1.11.install.iso",
>
> "JOBTOKEN" : "UbRjyypdlZVxxZKB",
> "MACHINE" : "OBS",
> "NAME" : "00000019-obs-2.6.7-ISO-x86_64-Build11-OBS",
> "OPENQA_HOSTNAME" : "localhost",
> "OPENQA_URL" : "localhost",
> "QEMUCPU" : "qemu64",
> "QEMUCPUS" : "4",
> "QEMUPORT" : "20012",
> "QEMURAM" : "4096",
> "TEST" : "OBS",
> "VERSION" : "2.6.7",
> "VNC" : "91",
> "WORKER_ID" : "1",
> "WORKER_INSTANCE" : "1"
> }
> +++ worker notes +++
> start time: 2016-01-13 20:30:08
> running on e540.ixen-bg:1 (Linux 4.1.13-5-default #1 SMP PREEMPT Thu Nov
> 26 16:35:17 UTC 2015 (49475c3) x86_64)
> scheduling boot tests/boot.pm
> scheduling check_obs_services tests/check_obs_services.pm
> init needles from /var/lib/openqa/share/tests/obs/needles
> loaded 4 needles
> 13504: to_child 12, from_child 13
> 13504: cmdpipe 11, rsppipe 14
> started mgmt loop with thread id 1
> DIE Can't use string ("distribution") as a HASH ref while "strict refs"
> in use at /usr/lib/os-autoinst/backend/baseclass.pm line 108.
>
> at /usr/lib/os-autoinst/backend/baseclass.pm line 73 thread 1.
> backend::baseclass::die_handler('Can\'t use string ("distribution")
> as a HASH ref while "stric...') called at
> /usr/lib/os-autoinst/backend/baseclass.pm line 108 thread 1
> backend::baseclass::run('backend::qemu=HASH(0x6021dd8)', 11, 14)
> called at /usr/lib/os-autoinst/backend/driver.pm line 82 thread 1
> backend::driver::_run('backend::qemu=HASH(0x6021dd8)', 11, 14)
> called at /usr/lib/os-autoinst/backend/driver.pm line 69 thread 1
> eval {...} called at /usr/lib/os-autoinst/backend/driver.pm line 69
> thread 1
> sending magic and exit
> received magic close
> no backend running at /usr/lib/os-autoinst/bmwqemu.pm line 328.
> +++ worker notes +++
> end time: 2016-01-13 20:30:10
> result: died
> uploading vars.json
> uploading autoinst-log.txt
>
I hit this problem in mid November 2015. It came in a routine update to
openqa as an added requirement to define 'distribution' in the perl test
configuration files.
As I needed to keep moving, I cobbled together the following 'solution'
(it works for me, anyway) from the example setup provided for opensuse
testing.
The distribution I was working with was 'mageia5'. Replace this string
occurrence (and only that) with whatever distribution you are working
with in the following, both *file names and file contents as necessary*.
Here is what I had to do:
Create directories as necessary (owner geekotest, group root) to match
the examples below:
/var/lib/openqa/tests/Mageia_5/lib/mageia5distribution.pm
*Content:*
package mageia5distribution;
use base 'distribution';
# Base class for all openSUSE tests
use testapi qw(send_key %cmd assert_screen check_screen check_var
get_var type_password type_string wait_idle wait_serial mouse_hide);
sub init() {
my ($self) = @_;
$self->SUPER::init();
$self->init_cmd();
}
# this needs to move to the distribution
sub init_cmd() {
my ($self) = @_;
## keyboard cmd vars
%testapi::cmd = qw(
next alt-n
xnext alt-n
install alt-i
update alt-u
finish alt-f
accept alt-a
ok alt-o
continue alt-o
createpartsetup alt-c
custompart alt-c
addpart alt-d
donotformat alt-d
addraid alt-i
add alt-a
raid0 alt-0
raid1 alt-1
raid5 alt-5
raid6 alt-6
raid10 alt-i
mountpoint alt-m
filesystem alt-s
acceptlicense alt-a
instdetails alt-d
rebootnow alt-n
otherrootpw alt-s
noautologin alt-a
change alt-c
software s
package p
bootloader b
);
if (check_var('INSTLANG', "de_DE")) {
$testapi::cmd{"next"} = "alt-w";
$testapi::cmd{"createpartsetup"} = "alt-e";
$testapi::cmd{"custompart"} = "alt-b";
$testapi::cmd{"addpart"} = "alt-h";
$testapi::cmd{"finish"} = "alt-b";
$testapi::cmd{"accept"} = "alt-r";
$testapi::cmd{"donotformat"} = "alt-n";
$testapi::cmd{"add"} = "alt-h";
# $testapi::cmd{"raid6"}="alt-d"; 11.2 only
$testapi::cmd{"raid10"} = "alt-r";
$testapi::cmd{"mountpoint"} = "alt-e";
$testapi::cmd{"rebootnow"} = "alt-j";
$testapi::cmd{"otherrootpw"} = "alt-e";
$testapi::cmd{"change"} = "alt-n";
$testapi::cmd{"software"} = "w";
}
if (check_var('INSTLANG', "es_ES")) {
$testapi::cmd{"next"} = "alt-i";
}
if (check_var('INSTLANG', "fr_FR")) {
$testapi::cmd{"next"} = "alt-s";
}
## keyboard cmd vars end
}
# this needs to move to the distribution
sub x11_start_program($$$) {
my ($self, $program, $timeout, $options) = @_;
# enable valid option as default
$options->{valid} //= 1;
send_key "alt-f2";
mouse_hide(1);
assert_screen("desktop-runner", $timeout);
type_string $program;
wait_idle 5;
if ($options->{terminal}) { send_key "alt-t"; sleep 3; }
send_key "ret", 1;
# make sure desktop runner executed and closed when have had valid
value
# exec x11_start_program( $program, $timeout, { valid => 1 } );
if ($options->{valid}) {
# check 3 times
foreach my $i (1 .. 3) {
last unless check_screen "desktop-runner-border", 2;
send_key "ret", 1;
}
}
}
# this needs to move to the distribution
sub ensure_installed {
my ($self, @pkglist) = @_;
my $timeout;
if ($pkglist[-1] =~ /^[0-9]+$/) {
$timeout = $pkglist[-1];
pop @pkglist;
}
else {
$timeout = 80;
}
testapi::x11_start_program("xterm");
assert_screen('xterm-started');
$self->script_sudo("chown $testapi::username
/dev/$testapi::serialdev && echo 'chown-SUCCEEDED' >
/dev/$testapi::serialdev");
wait_serial('chown-SUCCEEDED');
type_string("pkcon install @pkglist; RET=\$?; echo \"\n pkcon
finished\n\"; echo \"pkcon-\${RET}-\" > /dev/$testapi::serialdev\n");
my @tags = qw/Policykit Policykit-behind-window pkcon-proceed-prompt/;
while (1) {
my $ret = check_screen(\@tags, $timeout);
last unless $ret;
if ($ret->{needle}->has_tag('Policykit')) {
type_password;
send_key("ret", 1);
@tags = grep { $_ ne 'Policykit' } @tags;
@tags = grep { $_ ne 'Policykit-behind-window' } @tags;
next;
}
if ($ret->{needle}->has_tag('Policykit-behind-window')) {
send_key("alt-tab");
sleep 3;
next;
}
if ($ret->{needle}->has_tag('pkcon-proceed-prompt')) {
send_key("y");
send_key("ret");
@tags = grep { $_ ne 'pkcon-proceed-prompt' } @tags;
next;
}
}
wait_serial('pkcon-0-', 27) || die "pkcon install did not succeed";
send_key("alt-f4"); # close xterm
}
sub script_sudo($$) {
my ($self, $prog, $wait) = @_;
send_key 'ctrl-l';
type_string "su -c \'$prog\'\n";
if (!get_var("LIVETEST")) {
assert_screen 'password-prompt';
type_password;
send_key "ret";
}
wait_idle $wait;
}
sub become_root() {
my ($self) = @_;
$self->script_sudo('bash', 1);
type_string "whoami > /dev/$testapi::serialdev\n";
wait_serial("root", 6) || die "Root prompt not there";
type_string "cd /tmp\n";
send_key('ctrl-l');
}
1;
# vim: set sw=4 et:
-------------------------------------------------------------------
/var/lib/openqa/tests/Mageia_5/main.pm
*content*
# Copyright (C) 2014 SUSE Linux GmbH
#
# 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) any later version.
#
# 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#!/usr/bin/perl -w
use strict;
use testapi;
use lockapi;
use autotest;
use needle;
use File::Find;
my $distri = testapi::get_var("CASEDIR") . '/lib/mageia5distribution.pm';
require $distri;
testapi::set_distribution(mageia5distribution->new());
autotest::loadtest "tests/boot.pm";
1;
# vim: set sw=4 et:
------------------------------------------------------------------------
/var/lib/openqa/tests/Mageia_5/tests/boot.pm
*content*
No changes - ie, starts like
# Copyright (C) 2014 SUSE Linux GmbH
#
# 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) any later version.
#
# 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use base "basetest";
use strict;
use testapi;
sub run {
#######################################################################
#
# Test execution file for Mageia5 Classical 64 bit iso
# BIOS boot
# kvm+qemu VM environment 1 CPU
#
.............
---------------------------------------------------------------------
Again, in all of these cases, please change mageia5 to the name of your
tested distribution, both in file names and file contents, whether that
string occurs as part of a longer word or not.
Any additional directories created need to be owned by geekotest.
Hope this helps.
On a general note, the above may be seen as a crude way of going about
things, but it worked for me. It could be worth updating the github
installation.ascii documentation to explain to new users how to deal
with this new restriction, as it was introduced well after Ludwig's
video, and currently gets no mention in the online webpage either.
Vladimir Zawalinski
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-factory+owner(a)opensuse.org