From 1f7ac82ca129f2870949f0dd382c84a0745737b6 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 24 May 2022 16:52:13 -0700 Subject: [PATCH] Set script_run_die_on_timeout distri-wide This is required for script_run invocations in current os-autoinst to tell it what to do if script_run times out, rather than failing or succeeding (this behaviour was always undefined). Right now you just get a deprecation warning but at some point not setting it will be fatal. This tells it to die if script_run times out; 0 would mean "just keep going, even though the terminal is probably still blocked waiting for the command to return". Signed-off-by: Adam Williamson --- lib/fedoradistribution.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/fedoradistribution.pm b/lib/fedoradistribution.pm index eca70739..c325fc06 100644 --- a/lib/fedoradistribution.pm +++ b/lib/fedoradistribution.pm @@ -23,6 +23,18 @@ use Cwd; use testapi qw(check_var get_var send_key type_string assert_screen check_screen assert_script_run validate_script_output enter_cmd type_password); use utils qw(console_login desktop_vt menu_launch_type); +# Class constructor +sub new { + my ($class) = @_; + my $self = $class->SUPER::new(@_); + + # script_run requires this to be set distri-wide or specified on + # each invocation, it tells os-autoinst what to do if a script_run + # times out (rather than succeeding or failing) + $self->{script_run_die_on_timeout} = 1; + return $self; +} + sub init() { my ($self) = @_;