From 2d99eb41ce5f83095e3fa4ddccd095006ca1a3ad Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 3 Feb 2022 14:17:30 -0800 Subject: [PATCH] Update to latest git, use new caret-based versioning --- .gitignore | 1 + ...-Disable-unreliable-stdout-stderr-ch.patch | 56 +++++++++++++++++++ ...-disable-xterm-console-dependent-ass.patch | 32 ----------- os-autoinst.spec | 42 ++++++++------ sources | 2 +- 5 files changed, 82 insertions(+), 51 deletions(-) create mode 100644 0001-NOT-UPSTREAMABLE-Disable-unreliable-stdout-stderr-ch.patch delete mode 100644 0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch diff --git a/.gitignore b/.gitignore index 2519d93..830a1e7 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ /os-autoinst-ad28b4b59369ada5731ebd7f0916bc2e52324988.tar.gz /os-autoinst-627473ea5222dd4ad4cb0bfe82f0d5b5bcbe23c8.tar.gz /os-autoinst-fdd1a2d8bdc9fdf9b23ae8f01b42b5092e6343dd.tar.gz +/os-autoinst-ab6013d738344791507525e45cbd9f972a444968.tar.gz diff --git a/0001-NOT-UPSTREAMABLE-Disable-unreliable-stdout-stderr-ch.patch b/0001-NOT-UPSTREAMABLE-Disable-unreliable-stdout-stderr-ch.patch new file mode 100644 index 0000000..0a3c1ca --- /dev/null +++ b/0001-NOT-UPSTREAMABLE-Disable-unreliable-stdout-stderr-ch.patch @@ -0,0 +1,56 @@ +From 2a65d73dc1f90d8606c318cefaf6e3a8eddfd50e Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 3 Feb 2022 12:27:17 -0800 +Subject: [PATCH] NOT UPSTREAMABLE: Disable unreliable stdout/stderr checks + +This is intended for package build environments only. It disables +some stdout/stderr checks which seem to be unreliable in package +builds for as-yet unknown reasons: + +https://progress.opensuse.org/issues/60755 +https://progress.opensuse.org/issues/105061 + +Signed-off-by: Adam Williamson +--- + t/07-commands.t | 2 +- + t/29-backend-driver.t | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/t/07-commands.t b/t/07-commands.t +index de9bcd7f..c356de3b 100755 +--- a/t/07-commands.t ++++ b/t/07-commands.t +@@ -216,7 +216,7 @@ subtest 'upload api' => sub { + + kill TERM => $spid; + waitpid($spid, 0); +-combined_like { eval { $cserver->stop() } } qr/commands process exited/, 'commands server stopped'; ++eval { $cserver->stop() }; + + done_testing; + +diff --git a/t/29-backend-driver.t b/t/29-backend-driver.t +index 6738ced3..d040e616 100755 +--- a/t/29-backend-driver.t ++++ b/t/29-backend-driver.t +@@ -21,14 +21,14 @@ chdir $dir; + my $cleanup = scope_guard sub { chdir $Bin; undef $dir }; + + my $driver; +-combined_like { $driver = backend::driver->new('null') } qr/(Blocking SIGCHLD|channel_out)/, 'log output for backend driver creation'; ++$driver = backend::driver->new('null'); + ok $driver, 'can create driver'; +-combined_like { ok $driver->start, 'can start driver' } qr/(Blocking SIGCHLD|channel_out)/, 'log content again'; ++ok $driver->start, 'can start driver'; + isnt $driver->{backend_process}, {}, 'backend process was started' or explain $driver->{backend_process}; + is $driver->extract_assets, undef, 'extract_assets'; + ok $driver->start_vm, 'start_vm'; + is $driver->mouse_hide, 0, 'mouse_hide'; +-combined_like { is $driver->stop_backend, undef, 'stop_backend' } qr/backend.*exited/, 'exit logged'; ++is $driver->stop_backend, undef, 'stop_backend'; + is $driver->stop, undef, 'stop'; + done_testing; + +-- +2.35.0 + diff --git a/0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch b/0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch deleted file mode 100644 index ea7b74d..0000000 --- a/0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7563875c62a44c9f9bc143b74bcb667c04ac3c33 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Wed, 19 Jan 2022 15:40:57 -0800 -Subject: [PATCH] NOT UPSTREAMABLE: disable xterm-console dependent assertions - -These assertions don't work without xterm-console. - -Signed-off-by: Adam Williamson ---- - t/29-backend-ipmi.t | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/t/29-backend-ipmi.t b/t/29-backend-ipmi.t -index abaf2463..f3ed64bd 100755 ---- a/t/29-backend-ipmi.t -+++ b/t/29-backend-ipmi.t -@@ -45,9 +45,9 @@ ok $backend->do_stop_vm, 'can call do_stop_vm'; - ok !$backend->check_socket(undef), 'check_socket not returning true by default'; - ok $backend->get_mc_status, 'can call get_mc_status'; - --is $testapi::distri->{consoles}->{sol}->{args}->{log}, '1'; --$testapi::distri->{consoles}->{sol}->{DISPLAY} = "display"; --ok !$testapi::distri->{consoles}->{sol}->callxterm('ipmi', "console"), "can create console with log enabled"; -+#is $testapi::distri->{consoles}->{sol}->{args}->{log}, '1'; -+#$testapi::distri->{consoles}->{sol}->{DISPLAY} = "display"; -+#ok !$testapi::distri->{consoles}->{sol}->callxterm('ipmi', "console"), "can create console with log enabled"; - - # reduce retries for testing - $bmwqemu::vars{IPMI_MC_RESET_MAX_TRIES} = $bmwqemu::vars{IPMI_MC_RESET_TIMEOUT} = 3; --- -2.34.1 - diff --git a/os-autoinst.spec b/os-autoinst.spec index 709ab26..aef8d81 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -24,27 +24,31 @@ # them to the perl vendor dir, but they wouldn't bite. # https://github.com/os-autoinst/os-autoinst/issues/387 %global __provides_exclude_from %{_prefix}/lib/os-autoinst -%global __requires_exclude perl\\((autotest|backend|basetest|bmwqemu|commands|consoles|cv|distribution|lockapi|mmapi|myjsonrpc|needle|ocr|osutils|signalblocker|testapi|OpenQA::Exceptions|OpenQA::Benchmark::Stopwatch|OpenQA::Qemu|OpenQA::Isotovideo|OpenQA::NamedIOSelect) +%global __requires_exclude perl\\((autotest|backend|basetest|bmwqemu|commands|consoles|cv|distribution|lockapi|log|mmapi|myjsonrpc|needle|ocr|osutils|signalblocker|testapi|OpenQA::Exceptions|OpenQA::Benchmark::Stopwatch|OpenQA::Qemu|OpenQA::Isotovideo|OpenQA::NamedIOSelect) %{?perl_default_filter} %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.6 -%global github_commit fdd1a2d8bdc9fdf9b23ae8f01b42b5092e6343dd +%global github_commit ab6013d738344791507525e45cbd9f972a444968 # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20220119 +%global github_date 20220201 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst -Version: %{github_version} -Release: 44%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Version: %{github_version}%{?github_date:^%{github_date}git%{shortcommit}} +Release: 1%{?dist} Summary: OS-level test automation License: GPLv2+ URL: https://os-autoinst.github.io/openQA/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz -# Disable some test assertions that don't work without xterm-console -# Remove this when we have xterm-console packaged -Patch0: 0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch +# Disable some stdout/stderr checks that are unreliable in package +# build environments for unknown reasons: +# https://progress.opensuse.org/issues/60755 +# https://progress.opensuse.org/issues/105061 +# SUSE just wipes the test files entirely, but it seems nicer to +# have the benefit of the rest of the checks +Patch0: 0001-NOT-UPSTREAMABLE-Disable-unreliable-stdout-stderr-ch.patch # on SUSE this is conditional, for us it doesn't have to be but we # still use a macro just to keep build_requires similar for ease of @@ -70,11 +74,11 @@ Patch0: 0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch # all requirements needed by the tests, do not require on this in the package # itself or any sub-packages # diff from SUSE: replaced qemu with qemu-kvm, qemu-tools with -# qemu-img, qemu-x86 with qemu-system-i386. Dependencies from -# 4b4d3fd omitted for now until xterm-console is packaged for +# qemu-img, qemu-x86 with qemu-system-i386, xorg-x11-Xvnc with +# tigervnc-server-minimal (provider of /usr/bin/Xvnc) # Fedora # The following line is generated from dependencies.yaml (upstream) -%define test_base_requires %main_requires cpio perl(Benchmark) perl(Devel::Cover) perl(FindBin) perl(Pod::Coverage) perl(Test::Fatal) perl(Test::Mock::Time) perl(Test::MockModule) perl(Test::MockObject) perl(Test::MockRandom) perl(Test::Mojo) perl(Test::Most) perl(Test::Output) perl(Test::Pod) perl(Test::Strict) perl(Test::Warnings) >= 0.029 procps python3-setuptools qemu-kvm /usr/bin/qemu-img /usr/bin/qemu-system-i386 +%define test_base_requires %main_requires cpio icewm perl(Benchmark) perl(Devel::Cover) perl(FindBin) perl(Pod::Coverage) perl(Test::Fatal) perl(Test::Mock::Time) perl(Test::MockModule) perl(Test::MockObject) perl(Test::MockRandom) perl(Test::Mojo) perl(Test::Most) perl(Test::Output) perl(Test::Pod) perl(Test::Strict) perl(Test::Warnings) >= 0.029 procps python3-setuptools qemu-kvm /usr/bin/qemu-img /usr/bin/qemu-system-i386 tigervnc-server-minimal xterm xterm-console # The following line is generated from dependencies.yaml (upstream) %define test_version_only_requires perl(Mojo::IOLoop::ReadWriteProcess) >= 0.28 # The following line is generated from dependencies.yaml (upstream) @@ -83,7 +87,7 @@ Patch0: 0001-NOT-UPSTREAMABLE-disable-xterm-console-dependent-ass.patch # diff from SUSE: dropped perl(Devel::Cover::Report::Codecov) as it's # not currently packaged for Fedora # The following line is generated from dependencies.yaml (upstream) -%define devel_requires %test_requires perl(Devel::Cover) perl(Perl::Tidy) +%define devel_requires %test_requires ShellCheck perl(Code::TidyAll) perl(Devel::Cover) perl(Perl::Tidy) BuildRequires: perl-devel BuildRequires: perl-generators @@ -149,15 +153,11 @@ rm -f t/13-osutils.t # https://github.com/tesseract-ocr/tesseract/issues/2052 rm -f t/02-test_ocr.t -# https://progress.opensuse.org/issues/60755 -rm -f t/07-commands.t - +# exclude unnecessary author tests +rm xt/00-tidy.t # Remove test relying on a git working copy rm xt/30-make.t -# This test can't work without xterm-console, which isn't in Fedora yet -rm -f t/27-consoles-local_xvnc.t - %build %cmake -DOS_AUTOINST_DOC_DIR:STRING=%{_docdir}/%{name} -DSYSTEMD_SERVICE_DIR:STRING="%{_unitdir}" -GNinja %ninja_build -C %{__cmake_builddir} @@ -219,6 +219,7 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm %{_prefix}/lib/os-autoinst/mmapi.pm %{_prefix}/lib/os-autoinst/myjsonrpc.pm %{_prefix}/lib/os-autoinst/lockapi.pm +%{_prefix}/lib/os-autoinst/log.pm %{_prefix}/lib/os-autoinst/cv.pm %{_prefix}/lib/os-autoinst/ocr.pm %{_prefix}/lib/os-autoinst/osutils.pm @@ -241,6 +242,11 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm %files devel %changelog +* Wed Feb 02 2022 Adam Williamson - 4.6^20220201gitab6013d-1 +- Update to latest git, resync spec +- Switch to newer caret-based snapshot versioning scheme +- Add xterm-console dependencies and re-enable tests that use it + * Mon Jan 24 2022 Adam Williamson - 4.6-44.20220119gitfdd1a2d - Update to latest git, resync spec - Disable some tests that don't work without xterm-console diff --git a/sources b/sources index 8892de2..d6c70ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (os-autoinst-fdd1a2d8bdc9fdf9b23ae8f01b42b5092e6343dd.tar.gz) = c4a865f4aeb713705db15c43f2dc63c8c82dbf3dbe2a6de939452d528be20bc0683df0a589107d0f36c2d9a1bc6cb8553b5af352f179cb85d5761883e65c3f2b +SHA512 (os-autoinst-ab6013d738344791507525e45cbd9f972a444968.tar.gz) = 9f4f3621b8dfcada319edc26465cc575cc0f7aa992653951e2cc9cb2bda3c17c3354e3ee44aa53180e9595bce2e81a925a936c318a319a359b7a2faccfe64093