libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testsuite.at for version 2.x Was: ... mingw-cross, check-local fail


From: Ralf Wildenhues
Subject: Re: testsuite.at for version 2.x Was: ... mingw-cross, check-local fail for DESTDIR tests
Date: Sun, 23 Nov 2008 22:41:46 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Ralf Wildenhues wrote on Wed, Nov 19, 2008 at 07:42:02AM CET:
> 
> >> Test 29 "static linking flags for programs" skipped (static.at:177) -  
> >> problem is with "libtool --mode install" since real executable is in  
> >> .libs subdirectory. No idea how to fix.
> > It is not "--mode install" problem.
> > Still skipped. It is too big test :) .
> 
> The test for the executables that are supposed to fail is too strict for
> wine output and error status.

To fix the loose end wrt. the exec checks, there was some exit status
normalization needed here.  I think this patch should be sufficient,
once the $EXEEXT patch is in (comes next).

Pushed.

Cheers, and thanks,
Ralf

    Adjust executable run tests to cwrapper changes.
    
    * tests/testsuite.at (LT_AT_EXEC_CHECK): Accept fifth argument
    ARGS-OR-STATUS-ADJUST, for command-line arguments and/or exit
    status flattening.  Rewrite to prefer the executable with the
    `.exe' prefix over one without.  Test exit status against
    expected exit status, not against zero, when determining whether
    this may be a cross-compilation-induced result.
    (LT_AT_NOINST_EXEC_CHECK): Likewise.
    * tests/static.at (static linking flags for programs): Adjust
    calls.
    Report by Roumen Petrov.

diff --git a/tests/static.at b/tests/static.at
index b5e9946..6c91b1f 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -194,11 +194,11 @@ func_test_exec_fail ()
     for st
     do
       echo "# m$st"
-      LT_AT_EXEC_CHECK([./m$st || (exit 1)], [1], [], [ignore])
+      LT_AT_EXEC_CHECK([./m$st], [1], [], [ignore], [|| (exit 1)])
       # For some per-deplib flag combinations there may be no installed 
program,
       # because liba2 is not yet installed.
       if test -f "$bindir/m$st"; then
-       LT_AT_EXEC_CHECK([$bindir/m$st || (exit 1)], [1], [], [ignore])
+       LT_AT_EXEC_CHECK([$bindir/m$st], [1], [], [ignore], [|| (exit 1)])
       fi
     done
   fi
diff --git a/tests/testsuite.at b/tests/testsuite.at
index f7e805e..9511c06 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -203,29 +203,45 @@ m4_define([_LT_AT_TRANSLATE_TEXT_OUTPUT],
 esac])
 
 
-# LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR])
+# LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR],
+#                 [ARGS-OR-STATUS-ADJUST])
 # --------------------------------------------------------------
+# Run EXECUTABLE ARGS-OR-STATUS-ADJUST.  STATUS, STDOUT, and STDERR are
+# handled as in AT_CHECK, but expout and experr get line endings
+# translated.
+# However, if we are cross-compiling, then SKIP instead of FAIL.
+# ARGS-OR-STATUS-ADJUST can also contain code like `|| (exit 1)'
+# to unify different possible exit status values.
 m4_define([LT_AT_EXEC_CHECK],
 [m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])])
 m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
-AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
-          elif test "X$host" != "X$build" && \
-               { test -x "$1" || test -x "$1"$EXEEXT; }
-          then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4])
+lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
+AT_CHECK([if "$lt_exe" $5; then :; else lt_status=$?; ]dnl
+        [  m4_ifval([$2], [test $lt_status != $2 && ])]dnl
+        [  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl
+        [  exit $lt_status; fi],[$2],[$3],[$4])
 ])
 
 
 # LT_AT_NOINST_EXEC_CHECK(EXECUTABLE, [NOINST-MODULES],
-#                        [STATUS = 0], [STDOUT], [STDERR])
+#                        [STATUS = 0], [STDOUT], [STDERR],
+#                        [ARGS-OR-STATUS-ADJUST])
 # ---------------------------------------------------------
+# Run EXECUTABLE ARGS-OR-STATUS-ADJUST using `libtool --mode=execute'
+# with `-dlopen' arguments in NOINST_MODULES.  STATUS, STDOUT, and
+# STDERR are handled as in AT_CHECK, but expout and experr get line
+# endings translated.
+# However, if we are cross-compiling, then SKIP instead of FAIL.
+# ARGS-OR-STATUS-ADJUST can also contain code like `|| (exit 1)'
+# to unify different possible exit status values.
 m4_define([LT_AT_NOINST_EXEC_CHECK],
 [m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
 m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])])
-AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
-          if test $lt_status -eq 0; then :;
-          elif test "X$host" != "X$build" && \
-               { test -x "$1" || test -x "$1"$EXEEXT; }
-          then (exit 77); else (exit $lt_status); fi],[$3],[$4],[$5])
+lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
+AT_CHECK([if $LIBTOOL --mode=execute $2 "$lt_exe" $6; then :; else 
lt_status=$?; ]dnl
+        [  m4_ifval([$2], [test $lt_status != $2 && ])]dnl
+        [  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl
+        [  exit $lt_status; fi],[$3],[$4],[$5])
 ])
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]