]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
t/pm: Fix fake XFAIL perl tests
authorMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>
Tue, 26 Jun 2018 12:57:59 +0000 (14:57 +0200)
committerMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>
Tue, 26 Jun 2018 12:57:59 +0000 (14:57 +0200)
Use eval to fix fail XFAIL perl test and catch fatal errors.

* t/pm: No more XFAIL perl tests

t/list-of-tests.mk
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

index d972322c0a7f83860daa12322c7ed1d7f6bba0a0..0b360b33908db6eb93dacac9b383cb1be0f29591 100644 (file)
 ## 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 \
index a929750ff10998929db364374e11ce372e5a7388..b7d0b0a194f270e7d24b0c6bd8e4f63839780f84 100644 (file)
@@ -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;
index f586a67b9c1f31b28ea866c78010cbf4052ea7e4..882daa99f1a72df27c8c592851cd3586255e9c56 100644 (file)
@@ -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;
index 769d01b9ab47ae7e86482293e6f878e9b0619656..0294d74b668240d60e813b6713148f3045e9eb5f 100644 (file)
@@ -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;
index e5f204db6f768fc2645aa1af105db893eaefc06d..2bfd51ab0dda9c1d4829cb8e82ea05c86d6bed26 100644 (file)
@@ -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;
index cc1f467fd80932e0b17a343716e33fa63a92c172..6ccd734f7ffe9c75298f5869161d5a1e299f430e 100644 (file)
@@ -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;
index d6d0111dd1a2c8027b36782b430cf9a7a8a201ad..808e6cfd061dc5adb196bf55ca2fe7b7a3c2ecf7 100644 (file)
@@ -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;
index f1583c081df21f541fb359b52e937074dcc85490..ded43c26b519ec99b86cbb376605d7be315e402b 100644 (file)
@@ -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;