From ec84c0f78bbcaece4d35cc723c7ad66db7f777bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 13 Jul 2021 12:31:30 +0200 Subject: [PATCH] Adapt a test to changes in XS-Parse-Keyword-Builder-0.09 --- Future-AsyncAwait-0.51-rt137589.patch | 43 +++++++++++++++++++++++++++ perl-Future-AsyncAwait.spec | 10 +++++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 Future-AsyncAwait-0.51-rt137589.patch diff --git a/Future-AsyncAwait-0.51-rt137589.patch b/Future-AsyncAwait-0.51-rt137589.patch new file mode 100644 index 0000000..f62edaa --- /dev/null +++ b/Future-AsyncAwait-0.51-rt137589.patch @@ -0,0 +1,43 @@ +Date: Tue, 13 Jul 2021 06:22:57 -0400 +From: Paul Evans via RT +To: ppisar@redhat.com +Subject: [rt.cpan.org #137589] XS-Parse-Keyword-Builder-0.09 breaks t/32compile-errors.t: Failed test 'Failure message complains about undeclared $api' + + + +Patched. Will be in next version + +=== modified file 't/32compile-errors.t' +--- old/t/32compile-errors.t 2020-07-06 21:44:29 +0000 ++++ new/t/32compile-errors.t 2021-07-13 09:43:42 +0000 +@@ -7,6 +7,8 @@ + + use Future::AsyncAwait; + ++use constant HAVE_XPK_0_09 => ( $XS::Parse::Keyword::VERSION >= 0.09 ); ++ + # All of these should fail to compile but not SEGV. If we get to the end of + # the script without segfaulting, we've passed. + +@@ -69,6 +71,10 @@ + { + local $@; + ++ my $err = HAVE_XPK_0_09 ? ++ qr/^parse failed--compilation aborted / : ++ qr/^Global symbol "\$api" requires explicit package name/; ++ + ok( !defined eval q' + package segfault; + use strict; +@@ -82,8 +88,7 @@ + })->()->get; + ', + 'RT131487 strict-failing code fails to compile' ); +- like( "$@", qr/^Global symbol "\$api" requires explicit package name/, +- 'Failure message complains about undeclared $api' ); ++ like( "$@", $err, 'Failure message complains about undeclared $api' ); + } + + done_testing; + diff --git a/perl-Future-AsyncAwait.spec b/perl-Future-AsyncAwait.spec index 32118ac..72497ba 100644 --- a/perl-Future-AsyncAwait.spec +++ b/perl-Future-AsyncAwait.spec @@ -14,11 +14,14 @@ Name: perl-Future-AsyncAwait Version: 0.51 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Deferred subroutine syntax for futures License: GPL+ or Artistic URL: https://metacpan.org/release/Future-AsyncAwait Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Future-AsyncAwait-%{version}.tar.gz +# Adapt a test to changes in XS-Parse-Keyword-Builder-0.09, bug #1981565, +# CPAN RT#137589, in upstream after 0.51. +Patch0: Future-AsyncAwait-0.51-rt137589.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: perl-devel @@ -152,7 +155,7 @@ Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %prep -%setup -q -n Future-AsyncAwait-%{version} +%autosetup -p1 -n Future-AsyncAwait-%{version} for F in \ %if !%{optional_tests} || !%{with perl_Future_AsyncAwait_enables_Devel_MAT} t/82devel-mat-dumper-helper.t \ @@ -214,6 +217,9 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print %{_libexecdir}/%{name} %changelog +* Tue Jul 13 2021 Petr Pisar - 0.51-4 +- Adapt a test to changes in XS-Parse-Keyword-Builder-0.09 (bug #1981565) + * Wed Jun 02 2021 Petr Pisar - 0.51-3 - Rebuild against perl-XS-Parse-Keyword-0.06 (bug #1966787)