Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reboot after fully patched for offline migration #3205

Merged
merged 1 commit into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions lib/migration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@ use utils;
use registration;

our @EXPORT = qw(
setup_online_migration
setup_migration
register_system_in_textmode
de_register
remove_ltss
disable_installation_repos
);

sub setup_online_migration {
sub setup_migration {
my ($self) = @_;
# if source system is minimal installation then boot to textmode
# we don't care about source system start time because our SUT is upgraded one
$self->wait_boot(textmode => !is_desktop_installed, ready_time => 600);
select_console 'root-console';

# stop packagekit service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@

use base "consoletest";
use strict;
use utils;
use testapi;
use migration;

sub run() {
my ($self) = @_;
$self->setup_online_migration;

# if source system is minimal installation then boot to textmode
# we don't care about source system start time because our SUT is upgraded one
$self->wait_boot(textmode => !is_desktop_installed, ready_time => 600);
$self->setup_migration;
}

sub test_flags() {
Expand Down
18 changes: 9 additions & 9 deletions tests/update/patch_before_migration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ sub is_smt_or_module_tests {
return get_var('SCC_ADDONS', '') =~ /asmm|contm|hpcm|lgm|pcm|tcm|wsm|idu|ids/ || get_var('TEST', '') =~ /migration_offline_sle12sp\d_smt/;
}

sub system_prepare() {
select_console 'root-console';
type_string "chown $username /dev/$serialdev\n";
type_string "echo 'export Y2DEBUG=1' >> /etc/bash.bashrc.local\n";
script_run "source /etc/bash.bashrc.local";
}

sub patching_sle() {
my ($self) = @_;

set_var("VIDEOMODE", 'text');
set_var("SCC_REGISTER", 'installation');
# remember we perform registration on pre-created HDD images
Expand All @@ -53,6 +48,9 @@ sub patching_sle() {

if (get_var('FULL_UPDATE')) {
fully_patch_system();
type_string "reboot\n";
$self->wait_boot(textmode => !is_desktop_installed, ready_time => 600);
$self->setup_migration;
}

de_register(version_variable => 'HDDVERSION');
Expand All @@ -65,8 +63,10 @@ sub patching_sle() {
}

sub run() {
system_prepare();
patching_sle();
my ($self) = @_;

$self->setup_migration;
$self->patching_sle();
}

sub test_flags {
Expand Down