mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-30 14:30:15 +08:00
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. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
parent
c6d628415d
commit
2258787e02
12
ChangeLog
12
ChangeLog
@ -1,5 +1,17 @@
|
|||||||
2008-11-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
2008-11-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
No trailing period in Autotest test group names.
|
No trailing period in Autotest test group names.
|
||||||
* tests/link-order.at (Link order test): Drop trailing period
|
* tests/link-order.at (Link order test): Drop trailing period
|
||||||
from test name.
|
from test name.
|
||||||
|
@ -194,11 +194,11 @@ func_test_exec_fail ()
|
|||||||
for st
|
for st
|
||||||
do
|
do
|
||||||
echo "# m$st"
|
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,
|
# For some per-deplib flag combinations there may be no installed program,
|
||||||
# because liba2 is not yet installed.
|
# because liba2 is not yet installed.
|
||||||
if test -f "$bindir/m$st"; then
|
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
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -203,29 +203,45 @@ m4_define([_LT_AT_TRANSLATE_TEXT_OUTPUT],
|
|||||||
esac])
|
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_define([LT_AT_EXEC_CHECK],
|
||||||
[m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])])
|
[m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])])
|
||||||
m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
|
m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
|
||||||
AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
|
lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
|
||||||
elif test "X$host" != "X$build" && \
|
AT_CHECK([if "$lt_exe" $5; then :; else lt_status=$?; ]dnl
|
||||||
{ test -x "$1" || test -x "$1"$EXEEXT; }
|
[ m4_ifval([$2], [test $lt_status != $2 && ])]dnl
|
||||||
then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4])
|
[ 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],
|
# 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_define([LT_AT_NOINST_EXEC_CHECK],
|
||||||
[m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
|
[m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
|
||||||
m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])])
|
m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])])
|
||||||
AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
|
lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
|
||||||
if test $lt_status -eq 0; then :;
|
AT_CHECK([if $LIBTOOL --mode=execute $2 "$lt_exe" $6; then :; else lt_status=$?; ]dnl
|
||||||
elif test "X$host" != "X$build" && \
|
[ m4_ifval([$2], [test $lt_status != $2 && ])]dnl
|
||||||
{ test -x "$1" || test -x "$1"$EXEEXT; }
|
[ test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl
|
||||||
then (exit 77); else (exit $lt_status); fi],[$3],[$4],[$5])
|
[ exit $lt_status; fi],[$3],[$4],[$5])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user