bug-libtool
[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: Tue, 11 Nov 2008 23:12:00 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Roumen, all,

apologies for the huge delay.

* Roumen Petrov wrote on Sat, May 10, 2008 at 12:25:48PM CEST:
> The libtool version before 2.x (as example 1.5x) in mingw-cross  
> compilation environment create executables as follow:
> - foo : wrapper shell script
> - foo.exe : libtool wrapper executable
> . libs/foo.exe : native(host) executable
>
> Since version 2.x don't create wrapper shell script in build directory  
> make check{-local} skip any tests. The reason is code of macro  
> LT_AT_EXEC_CHECK:
[...]
> The program $1 (wrapper shell scrip in 1.5x and former) don't exist,  
> lt_status is non zero and macro code exit with status 77 (exist wrapper  
> executable "$1"$EXEEXT).
>
> Also same problem in macro LT_AT_NOINST_EXEC_CHECK.

Agreed.  Please try this patch.  Thanks.

Others, OK to commit?

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.
    (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..6bb34f4 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -203,29 +203,43 @@ 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
+        [  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 ]dnl
+        [  lt_status=$?; 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]