From 45e7e85f0bc4798ef6ff7cbd3443c55aa642774b Mon Sep 17 00:00:00 2001 From: Matthias Paulmier Date: Tue, 26 Jun 2018 14:57:59 +0200 Subject: t/pm: Fix fake XFAIL perl tests Use eval to fix fail XFAIL perl test and catch fatal errors. * t/pm: No more XFAIL perl tests --- t/list-of-tests.mk | 12 ------------ t/pm/Channels.pl | 7 ++++++- t/pm/Cond2.pl | 7 ++++++- t/pm/Cond3.pl | 7 ++++++- t/pm/DisjCon2.pl | 8 +++++++- t/pm/DisjCon3.pl | 8 +++++++- t/pm/Version2.pl | 7 ++++++- t/pm/Version3.pl | 7 ++++++- 8 files changed, 44 insertions(+), 19 deletions(-) diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index d972322c0..0b360b339 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -17,18 +17,6 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -# FIXME: this "expected failures" are in truth an hack used to -# FIXME: to verify that some incorrect usages of our perl libraries -# FIXME: raise an error. We should find a cleaner way to check that. -perl_fake_XFAIL_TESTS = \ -t/pm/Channels.pl \ -t/pm/Cond2.pl \ -t/pm/Cond3.pl \ -t/pm/DisjCon2.pl \ -t/pm/DisjCon3.pl \ -t/pm/Version2.pl \ -t/pm/Version3.pl - XFAIL_TESTS = \ t/all.sh \ t/auxdir-pr19311.sh \ diff --git a/t/pm/Channels.pl b/t/pm/Channels.pl index a929750ff..b7d0b0a19 100644 --- a/t/pm/Channels.pl +++ b/t/pm/Channels.pl @@ -18,4 +18,9 @@ use Automake::Channels; use Automake::Location; -msg ('test-fatal', new Automake::Location ('.'), "Test Message"); +eval { msg ('test-fatal', new Automake::Location ('.'), "Test Message") }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; diff --git a/t/pm/Cond2.pl b/t/pm/Cond2.pl index f586a67b9..882daa99f 100644 --- a/t/pm/Cond2.pl +++ b/t/pm/Cond2.pl @@ -19,4 +19,9 @@ use Automake::Condition; my $cond = new Automake::Condition ('TRUE'); -new Automake::Condition ($cond); +eval { new Automake::Condition ($cond) }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; diff --git a/t/pm/Cond3.pl b/t/pm/Cond3.pl index 769d01b9a..0294d74b6 100644 --- a/t/pm/Cond3.pl +++ b/t/pm/Cond3.pl @@ -19,4 +19,9 @@ use Automake::Condition; my $cond = new Automake::Condition ("COND1_TRUE"); -new Automake::Condition ("$cond"); +eval { new Automake::Condition ("$cond") }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; diff --git a/t/pm/DisjCon2.pl b/t/pm/DisjCon2.pl index e5f204db6..2bfd51ab0 100644 --- a/t/pm/DisjCon2.pl +++ b/t/pm/DisjCon2.pl @@ -21,4 +21,10 @@ use Automake::DisjConditions; my $cond = new Automake::Condition ('TRUE'); my $cond2 = new Automake::DisjConditions ($cond); -new Automake::DisjConditions ($cond2); + +eval { new Automake::DisjConditions ($cond2) }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; diff --git a/t/pm/DisjCon3.pl b/t/pm/DisjCon3.pl index cc1f467fd..6ccd734f7 100644 --- a/t/pm/DisjCon3.pl +++ b/t/pm/DisjCon3.pl @@ -20,4 +20,10 @@ use Automake::Condition qw/TRUE FALSE/; use Automake::DisjConditions; my $cond = new Automake::Condition ("COND1_TRUE"); -new Automake::DisjConditions ("$cond"); + +eval { new Automake::DisjConditions ("$cond") }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; diff --git a/t/pm/Version2.pl b/t/pm/Version2.pl index d6d0111dd..808e6cfd0 100644 --- a/t/pm/Version2.pl +++ b/t/pm/Version2.pl @@ -17,4 +17,9 @@ use Automake::Version; -Automake::Version::check ('', '1.2.3'); +eval { Automake::Version::check ('', '1.2.3') }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; diff --git a/t/pm/Version3.pl b/t/pm/Version3.pl index f1583c081..ded43c26b 100644 --- a/t/pm/Version3.pl +++ b/t/pm/Version3.pl @@ -17,4 +17,9 @@ use Automake::Version; -Automake::Version::check ('1.2.3', ''); +eval { Automake::Version::check ('1.2.3', '') }; + +warn $@ if $@; + +exit 0 if $@; +exit 1; -- cgit v1.2.1