]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: mark 'syntax of .la files' as XFAIL, expose failure.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 30 Aug 2010 20:42:11 +0000 (22:42 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 30 Aug 2010 20:42:11 +0000 (22:42 +0200)
* tests/lalib-syntax.at (syntax of .la files): Assert that the
string returned by lt_dlerror after a failure is non-NULL, so
the failure shows up on systems other than Solaris.  Mark test
as expected to fail.
Suggested by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/lalib-syntax.at

index 60a2297c10cb1e76b62c2c9dba021235e98410cc..24d051b5a72ca7ae7ae293443f230a81a7e5d99f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: mark 'syntax of .la files' as XFAIL, expose failure.
+       * tests/lalib-syntax.at (syntax of .la files): Assert that the
+       string returned by lt_dlerror after a failure is non-NULL, so
+       the failure shows up on systems other than Solaris.  Mark test
+       as expected to fail.
+       Suggested by Bob Friesenhahn.
+
 2010-08-30  Eric Blake  <eblake@redhat.com>
 
        Simplify recent configure quoting portability workaround.
index c412d54cf20685c5fb2d7b2cca2c5f6a3eec69c6..0f78ca8a244531004a103a5907b4394fe3023530 100644 (file)
@@ -1,6 +1,6 @@
 # lalib-syntax.at -- parsing .la files robustly  -*- Autotest -*-
 #
-#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 #
 #   This file is part of GNU Libtool.
 #
@@ -25,9 +25,12 @@ AT_SETUP([syntax of .la files])
 AT_KEYWORDS([libtool])
 AT_KEYWORDS([libltdl])
 
+AT_XFAIL_IF([:]) dnl libltdl does not consistently return non-NULL lt_dlerror
+
 AT_DATA([main.c],
 [[#include <ltdl.h>
 #include <stdio.h>
+#include <assert.h>
 
 int
 main (int argc, char* argv[])
@@ -50,7 +53,9 @@ main (int argc, char* argv[])
     }
   else
     {
-      printf ("plugin failed to open: %s\n", lt_dlerror());
+      const char *error = lt_dlerror ();
+      assert (error != NULL);
+      printf ("plugin failed to open: %s\n", error);
       err = 1;
     }
   lt_dlexit ();