summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>2018-06-26 14:57:59 +0200
committerMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>2018-06-26 14:57:59 +0200
commit45e7e85f0bc4798ef6ff7cbd3443c55aa642774b (patch)
tree28f4310d80336bb203cab12a171f7b04a3db181a
parent6e4030d97ce00ac8aaf130f6cc2ce8bd23b141c7 (diff)
downloadautomake-45e7e85f0bc4798ef6ff7cbd3443c55aa642774b.tar.gz
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
-rw-r--r--t/list-of-tests.mk12
-rw-r--r--t/pm/Channels.pl7
-rw-r--r--t/pm/Cond2.pl7
-rw-r--r--t/pm/Cond3.pl7
-rw-r--r--t/pm/DisjCon2.pl8
-rw-r--r--t/pm/DisjCon3.pl8
-rw-r--r--t/pm/Version2.pl7
-rw-r--r--t/pm/Version3.pl7
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 <https://www.gnu.org/licenses/>.
-# 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;