line |
stmt |
code |
1
|
|
# Copyright 2009-2013 Bernhard M. Wiedemann |
2
|
|
# Copyright 2012-2020 SUSE LLC |
3
|
|
# SPDX-License-Identifier: GPL-2.0-or-later |
4
|
|
|
5
|
|
use Mojo::Base 'backend::baseclass', -signatures; |
6
|
1
|
use autodie ':all'; |
|
1
|
|
|
1
|
|
7
|
1
|
use English; |
|
1
|
|
|
1
|
|
8
|
1
|
require IPC::System::Simple; |
|
1
|
|
|
1
|
|
9
|
|
use Carp qw(confess cluck carp croak); |
10
|
1
|
|
|
1
|
|
|
1
|
|
11
|
|
my $self = $class->SUPER::new; |
12
|
1
|
defined $bmwqemu::vars{WORKER_HOSTNAME} or die 'Need variable WORKER_HOSTNAME'; |
|
1
|
|
|
1
|
|
13
|
1
|
return $self; |
14
|
1
|
} |
15
|
1
|
|
16
|
|
################################################################### |
17
|
|
$self->truncate_serial_file; |
18
|
|
my $console = $testapi::distri->add_console('x3270', 's3270'); |
19
|
0
|
$console->backend($self); |
|
0
|
|
|
0
|
|
20
|
0
|
$self->select_console({testapi_console => 'x3270'}); |
21
|
0
|
|
22
|
0
|
return 1; |
23
|
0
|
} |
24
|
|
|
25
|
0
|
# first kill all _remote_ consoles except for the remote zVM |
26
|
|
# console (which would stop the vm guest) |
27
|
|
my @consoles = keys %{$self->{consoles}}; |
28
|
0
|
for my $console (@consoles) { |
|
0
|
|
|
0
|
|
29
|
|
$self->deactivate_console({testapi_console => $console}) |
30
|
|
unless $console =~ qr/bootloader|worker/; |
31
|
0
|
} |
|
0
|
|
32
|
0
|
|
33
|
0
|
return; |
34
|
|
} |
35
|
|
|
36
|
|
return $self->check_ssh_serial($fh) || $self->SUPER::check_socket($fh, $write); |
37
|
0
|
} |
38
|
|
|
39
|
|
1; |