Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package os-autoinst for openSUSE:Factory checked in at 2025-02-13 18:40:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/os-autoinst (Old) and /work/SRC/openSUSE:Factory/.os-autoinst.new.8181 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "os-autoinst" Thu Feb 13 18:40:35 2025 rev:500 rq:1245725 version:4.6.1739396963.cce4587 Changes: -------- --- /work/SRC/openSUSE:Factory/os-autoinst/os-autoinst.changes 2025-02-12 21:40:48.345177603 +0100 +++ /work/SRC/openSUSE:Factory/.os-autoinst.new.8181/os-autoinst.changes 2025-02-13 18:41:06.757301619 +0100 @@ -1,0 +2,32 @@ +Thu Feb 13 16:12:32 UTC 2025 - ok...@suse.com + +- Update to version 4.6.1739396963.cce4587: + * Use more Mojo::File operations in baseclass + * Use more Mojo::File operations in ocr.pm + * Use more Mojo::File operations in testapi.pm + * Use more Mojo::File operations in tools/ + * t: Use Mojo::File in 04-check_vars_docu.t + * Add support for newline seperator in SCHEDULE variable + * Use Feature::Compat::Try in testapi + * Use Feature::Compat::Try in script/os-autoinst-openvswitch + * Use Feature::Compat::Try in script/isotovideo + * Use Feature::Compat::Try in script/check_qemu_oom + * Use Feature::Compat::Try in osutils + * Use Feature::Compat::Try in consoles::sshXtermIPMI + * Use Feature::Compat::Try in consoles::VNC + * Use Feature::Compat::Try in consoles::VMWare + * Use Feature::Compat::Try in commands + * Use Feature::Compat::Try in bmwqemu + * Use Feature::Compat::Try in basetest + * Use Feature::Compat::Try in backend::qemu + * Use Feature::Compat::Try in backend::ipmi + * Use Feature::Compat::Try in backend::generalhw + * Use Feature::Compat::Try in backend::baseclass + * Use Feature::Compat::Try in autotest + * Use Feature::Compat::Try in OpenQA::Isotovideo::Proc + * Use Feature::Compat::Try in OpenQA::Isotovideo::Utils + * Use Feature::Compat::Try in OpenQA::Isotovideo::Runner + * Use Feature::Compat::Try in t + * Ensure a clean swtpm directory + +------------------------------------------------------------------- Old: ---- os-autoinst-4.6.1739353778.821904b.obscpio New: ---- os-autoinst-4.6.1739396963.cce4587.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ os-autoinst-devel-test.spec ++++++ --- /var/tmp/diff_new_pack.cqUyn5/_old 2025-02-13 18:41:07.557334763 +0100 +++ /var/tmp/diff_new_pack.cqUyn5/_new 2025-02-13 18:41:07.557334763 +0100 @@ -18,7 +18,7 @@ %define short_name os-autoinst-devel Name: %{short_name}-test -Version: 4.6.1739353778.821904b +Version: 4.6.1739396963.cce4587 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ os-autoinst-openvswitch-test.spec ++++++ --- /var/tmp/diff_new_pack.cqUyn5/_old 2025-02-13 18:41:07.585335923 +0100 +++ /var/tmp/diff_new_pack.cqUyn5/_new 2025-02-13 18:41:07.589336089 +0100 @@ -19,7 +19,7 @@ %define name_ext -test %define short_name os-autoinst-openvswitch Name: %{short_name}%{?name_ext} -Version: 4.6.1739353778.821904b +Version: 4.6.1739396963.cce4587 Release: 0 Summary: test package for %{short_name} License: GPL-2.0-or-later ++++++ os-autoinst-test.spec ++++++ --- /var/tmp/diff_new_pack.cqUyn5/_old 2025-02-13 18:41:07.609336917 +0100 +++ /var/tmp/diff_new_pack.cqUyn5/_new 2025-02-13 18:41:07.613337083 +0100 @@ -19,7 +19,7 @@ %define name_ext -test %define short_name os-autoinst Name: %{short_name}%{?name_ext} -Version: 4.6.1739353778.821904b +Version: 4.6.1739396963.cce4587 Release: 0 Summary: test package for os-autoinst License: GPL-2.0-or-later ++++++ os-autoinst.spec ++++++ --- /var/tmp/diff_new_pack.cqUyn5/_old 2025-02-13 18:41:07.637338077 +0100 +++ /var/tmp/diff_new_pack.cqUyn5/_new 2025-02-13 18:41:07.637338077 +0100 @@ -17,7 +17,7 @@ Name: os-autoinst -Version: 4.6.1739353778.821904b +Version: 4.6.1739396963.cce4587 Release: 0 Summary: OS-level test automation License: GPL-2.0-or-later ++++++ os-autoinst-4.6.1739353778.821904b.obscpio -> os-autoinst-4.6.1739396963.cce4587.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/OpenQA/Isotovideo/Utils.pm new/os-autoinst-4.6.1739396963.cce4587/OpenQA/Isotovideo/Utils.pm --- old/os-autoinst-4.6.1739353778.821904b/OpenQA/Isotovideo/Utils.pm 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/OpenQA/Isotovideo/Utils.pm 2025-02-12 22:49:23.000000000 +0100 @@ -382,7 +382,7 @@ unshift @INC, '.' unless path($bmwqemu::vars{CASEDIR})->is_abs; bmwqemu::fctinfo 'Enforced test schedule by \'SCHEDULE\' variable in action'; $bmwqemu::vars{INCLUDE_MODULES} = undef; - autotest::loadtest($_ =~ qr/\./ ? $_ : $_ . '.pm') foreach split(/[, ]+/, $bmwqemu::vars{SCHEDULE}); + autotest::loadtest($_ =~ qr/\./ ? $_ : $_ . '.pm') foreach split(/[, \n]+/, $bmwqemu::vars{SCHEDULE}); $bmwqemu::vars{INCLUDE_MODULES} = 'none'; } my $productdir = $bmwqemu::vars{PRODUCTDIR}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/backend/baseclass.pm new/os-autoinst-4.6.1739396963.cce4587/backend/baseclass.pm --- old/os-autoinst-4.6.1739353778.821904b/backend/baseclass.pm 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/backend/baseclass.pm 2025-02-12 22:49:23.000000000 +0100 @@ -1273,9 +1273,7 @@ while (defined(my $bytes_read = $chan->read($buffer, SSH_SERIAL_READ_BUFFER_SIZE))) { return 1 unless $bytes_read > 0; print $buffer; - open(my $serial, '>>', $self->{serialfile}); - print $serial $buffer; - close($serial); + my $serial = path($self->{serialfile})->open('>>')->print($buffer); } my ($error_code, $error_name, $error_string) = $ssh->error; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/doc/backend_vars.asciidoc new/os-autoinst-4.6.1739396963.cce4587/doc/backend_vars.asciidoc --- old/os-autoinst-4.6.1739353778.821904b/doc/backend_vars.asciidoc 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/doc/backend_vars.asciidoc 2025-02-12 22:49:23.000000000 +0100 @@ -12,7 +12,7 @@ WHEELS_DIR;string;;Absolute or relative path to the directory wheels are stored in if `CASEDIR` contains a `wheels.yaml`. Defaults to the working directory of `isotovideo`. Relative paths are considered relative to the working directory of `isotovideo`. INCLUDE_MODULES;string;;comma separated names or fullnames of test modules to be included while excluding all that do not match, e.g. "boot,mod1" EXCLUDE_MODULES;string;;comma separated names or fullnames of test modules to exclude. Can be combined with INCLUDE_MODULES and has precedence, e.g. to additionally exclude modules based on an include-list -SCHEDULE;string;;comma or space separated list of relative paths to test modules within CASEDIR to be scheduled instead of evaluating a schedule from the test distributions main.pm file, e.g. "boot,console/mod1". Test modules can be specified without the implicit file extension '.pm'. +SCHEDULE;string;;comma, space or newline separated list of relative paths to test modules within CASEDIR to be scheduled instead of evaluating a schedule from the test distributions main.pm file, e.g. "boot,console/mod1". Test modules can be specified without the implicit file extension '.pm'. _EXIT_AFTER_SCHEDULE;boolean;0;Exit test execution immediately after evaluation of the test schedule, e.g. to check only which test modules would be executed _SKIP_POST_FAIL_HOOKS;boolean;0;Skip the execution of post_fail_hook methods if set. This can be useful to save test execution time during test development when the post_fail_hook is not expected to provide any value as most likely the test developer already knows what needs to be done as a next step on a test fail. TEST_GIT_REFSPEC;string;;git refspec to checkout within `CASEDIR` when `CASEDIR` is a git working copy. By default, does not change the content of `CASEDIR`. Overrides the optional git refspec in `CASEDIR`. Can be used to explicitly select a git commit within an existing git working copy and also to skip unnecessary git network transfers when `CASEDIR` is already providing the right git working copy. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/ocr.pm new/os-autoinst-4.6.1739396963.cce4587/ocr.pm --- old/os-autoinst-4.6.1739353778.821904b/ocr.pm 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/ocr.pm 2025-02-12 22:49:23.000000000 +0100 @@ -4,25 +4,19 @@ package ocr; use Mojo::Base -strict, -signatures; +use Mojo::File 'path'; require IPC::System::Simple; sub tesseract ($img, $area) { my $imgfn = 'ocr.png'; my $txtfn = 'ocr'; # tesseract appends .txt automatically o_O my $txt; - - if ($area) { - $img = $img->copyrect($area->{xpos}, $area->{ypos}, $area->{width}, $area->{height}); - } - + $img = $img->copyrect($area->{xpos}, $area->{ypos}, $area->{width}, $area->{height}) if $area; $img->write($imgfn); # disable debug output, because new versions by default only reports errors and warnings system("tesseract $imgfn $txtfn quiet"); $txtfn .= '.txt'; - open(my $fh, '<:encoding(UTF-8)', $txtfn); - local $/; - $txt = <$fh>; - close $fh; + $txt = path($txtfn)->slurp('UTF-8'); unlink $imgfn; unlink $txtfn; return $txt; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/t/04-check_vars_docu.t new/os-autoinst-4.6.1739396963.cce4587/t/04-check_vars_docu.t --- old/os-autoinst-4.6.1739353778.821904b/t/04-check_vars_docu.t 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/t/04-check_vars_docu.t 2025-02-12 22:49:23.000000000 +0100 @@ -11,6 +11,7 @@ use Feature::Compat::Try; use FindBin; use File::Find; +use Mojo::File 'path'; require IPC::System::Simple; use autodie ':all'; @@ -42,11 +43,10 @@ sub read_doc () { # read and parse old vars doc - my $docfh; - open($docfh, '<', VARS_DOC); + my @lines = split /\n/, path(VARS_DOC)->slurp; my $backend; my $reading; - for my $line (<$docfh>) { + for my $line (@lines) { if (!$backend && $line =~ /^\.([^ ]+) backend$/) { $backend = $1; } @@ -66,20 +66,17 @@ } } } - close($docfh); } sub write_doc () { - my $docfh; - open($docfh, '>', VARS_DOC . '.newvars'); - print $docfh <<EO_HEADER; + my $data = <<EO_HEADER; Supported variables per backend ------------------------------- EO_HEADER for my $backend (sort keys %found_vars) { my $backend = uc $backend; - print $docfh <<EO_BACKEND_HEADER; + $data .= <<EO_BACKEND_HEADER; .$backend backend [grid="rows",format="csv"] [options="header",cols="^m,^m,^m,v",separator=";"] @@ -96,13 +93,14 @@ fail "missing documentation for backend $backend variable $var, please update backend_vars"; # uncoverable statement } my @var_docu = @{$documented_vars{$backend}{$var}}; - printf $docfh "%s;%s;%s;%s\n", $var, @var_docu; + $data .= sprintf "%s;%s;%s;%s\n", $var, @var_docu; } - print $docfh <<EO_BACKEND_FOOTER; + $data .= <<EO_BACKEND_FOOTER; |==================== EO_BACKEND_FOOTER } + path(VARS_DOC . '.newvars')->spew($data); } sub read_backend_pm { # no:style:signatures @@ -112,10 +110,8 @@ return if (grep { /$backend/i } @backend_blocklist); $backend = uc $backend; $backend = uc $backend_renames{$backend} if $backend_renames{$backend}; - my $fh; - try { open($fh, '<', $File::Find::name) } - catch ($e) { return fail 'Unable to open ' . $File::Find::name } # uncoverable statement - for my $line (<$fh>) { + my @lines = split /\n/, path($File::Find::name)->slurp; + for my $line (@lines) { my @vars = $line =~ /(?:\$bmwqemu::|\$)vars(?:->)?{["']?([^}"']+)["']?}/g; for my $var (@vars) { # initially I used array and kept greping through to maintain uniqueness, but I had problem greping ISO_$i @@ -123,7 +119,6 @@ $found_vars{$backend}{$var} = 1; } } - close($fh); } read_doc; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/t/20-openqa-isotovideo-utils.t new/os-autoinst-4.6.1739396963.cce4587/t/20-openqa-isotovideo-utils.t --- old/os-autoinst-4.6.1739353778.821904b/t/20-openqa-isotovideo-utils.t 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/t/20-openqa-isotovideo-utils.t 2025-02-12 22:49:23.000000000 +0100 @@ -52,7 +52,7 @@ subtest 'unable to load test module' => sub { $base_state->remove; my $module = 'foo/bar'; - $bmwqemu::vars{SCHEDULE} = $module; + $bmwqemu::vars{SCHEDULE} = $module . "\n"; combined_like { warning { throws_ok { load_test_schedule } qr/Can't locate $module\.pm/, 'error logged' } } qr/Can't locate $module\.pm/, 'debug message logged'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/testapi.pm new/os-autoinst-4.6.1739396963.cce4587/testapi.pm --- old/os-autoinst-4.6.1739353778.821904b/testapi.pm 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/testapi.pm 2025-02-12 22:49:23.000000000 +0100 @@ -13,6 +13,7 @@ use Time::HiRes qw(sleep gettimeofday tv_interval); use autotest 'query_isotovideo'; use Mojo::DOM; +use Mojo::File 'path'; use Net::Domain qw(hostfqdn); require IPC::System::Simple; use autodie ':all'; @@ -1112,10 +1113,7 @@ my $path = hashed_string($relpath); bmwqemu::log_call(path => $relpath); - open my $fh, ">", $path; - print $fh $content; - close $fh; - + path($path)->spew($content); return $path; } @@ -1140,10 +1138,7 @@ bmwqemu::diag("File doesn't exist: $path"); return; } - open my $fh, "<", $path; - my $content = do { local $/; <$fh> }; - close $fh; - return $content; + return path($path)->slurp; } =head2 validate_script_output diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-4.6.1739353778.821904b/tools/check_coverage new/os-autoinst-4.6.1739396963.cce4587/tools/check_coverage --- old/os-autoinst-4.6.1739353778.821904b/tools/check_coverage 2025-02-12 10:49:38.000000000 +0100 +++ new/os-autoinst-4.6.1739396963.cce4587/tools/check_coverage 2025-02-12 22:49:23.000000000 +0100 @@ -2,15 +2,13 @@ use Mojo::Base -strict, -signatures; use autodie; +use Mojo::File 'path'; die "Need threshold as argument" unless @ARGV; my $filename = 'cover_db/coverage.html'; - -open(my $fh, '<', $filename); -my @log = <$fh>; -close($fh); +my @log = split /\n/, path($filename)->slurp; my @summary = grep { /Total/ } @log; chomp @summary; my $summary_line = $summary[0]; ++++++ os-autoinst.obsinfo ++++++ --- /var/tmp/diff_new_pack.cqUyn5/_old 2025-02-13 18:41:09.225403868 +0100 +++ /var/tmp/diff_new_pack.cqUyn5/_new 2025-02-13 18:41:09.229404034 +0100 @@ -1,5 +1,5 @@ name: os-autoinst -version: 4.6.1739353778.821904b -mtime: 1739353778 -commit: 821904bebb450093fed0f35976ebbef81f242e78 +version: 4.6.1739396963.cce4587 +mtime: 1739396963 +commit: cce4587c368dcd5d49857c64e6c02e9ec7346b58