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

Run ltp #19369

Merged
merged 3 commits into from
May 23, 2024
Merged

Run ltp #19369

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/publiccloud/ec2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ sub img_proof {

sub cleanup {
my ($self, $args) = @_;
#if for some reason the instance is not created everything below does not make sense to execute
return unless ($args->{my_instance} && $args->{my_instance}->{instance_id});
my $instance_id = $args->{my_instance}->{instance_id};
script_run('cd ~/terraform');
pdostal marked this conversation as resolved.
Show resolved Hide resolved
my $instance_id = script_output('terraform output -json | jq -r ".vm_name.value[0]"', proceed_on_failure => 1);
script_run('cd');

select_host_console(force => 1);

Expand Down
3 changes: 1 addition & 2 deletions tests/publiccloud/run_ltp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sub run {
$instance = $self->{my_instance} = $args->{my_instance};
$provider = $self->{provider} = $args->{my_provider}; # required for cleanup
} else {
$provider = $self->provider_factory();
$provider = $self->{provider} = $self->provider_factory(); # required for cleanup
$instance = $self->{my_instance} = $provider->create_instance(check_guestregister => is_openstack ? 0 : 1);
}

Expand Down Expand Up @@ -193,7 +193,6 @@ sub cleanup {
script_run("(cd /tmp/log_instance && tar -zcf $root_dir/instance_log.tar.gz *)");
upload_logs("$root_dir/instance_log.tar.gz", failok => 1);
}
$self->SUPER::cleanup();
}

sub gen_ltp_env {
Expand Down
Loading