From: Alexandre Oliva Date: Fri, 19 Mar 1999 17:58:44 +0000 (+0000) Subject: * tests/*.test: when a test fails, skip tests that depend on it. X-Git-Tag: release-1-3~112 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43b5fec4e221ef71a4041454267ca5709e5c6eef;p=thirdparty%2Flibtool.git * tests/*.test: when a test fails, skip tests that depend on it. If a certain configuration is not supported, skip all its tests. --- diff --git a/ChangeLog b/ChangeLog index 54eeba8d7..dfe7536ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-03-19 Alexandre Oliva + * tests/*.test: when a test fails, skip tests that depend on it. + If a certain configuration is not supported, skip all its tests. + * doc/libtool.texi: reorder tests to reflect execution order * tests/noinst-link.test: new test diff --git a/tests/build-relink.test b/tests/build-relink.test index 4fc89d67b..03c82e854 100755 --- a/tests/build-relink.test +++ b/tests/build-relink.test @@ -11,15 +11,12 @@ fi . $srcdir/defs || exit 1 # Check that things are built. -if test -f ../demo/hell; then : +if test -f $prefix/lib/libhello.la && cd ../demo; then : else echo "You must run demo-inst.test before $0" 1>&2 - exit 1 + exit 77 fi -# Change to our build directory. -cd ../demo || exit 1 - # Unfortunately, we need access to libtool internals for this test. objdir=NONE eval `egrep -e '^objdir=' ./libtool 2>/dev/null` diff --git a/tests/cdemo-conf.test b/tests/cdemo-conf.test index d8c6ee4ea..c6d0d161b 100755 --- a/tests/cdemo-conf.test +++ b/tests/cdemo-conf.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../cdemo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1 +if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/cdemo-exec.test b/tests/cdemo-exec.test index e83cb2411..b7e5afaf0 100755 --- a/tests/cdemo-exec.test +++ b/tests/cdemo-exec.test @@ -13,7 +13,7 @@ fi if test -f ../cdemo/cdemo; then : else echo "You must run cdemo-make.test before running $0" 1>&2 - exit 1 + exit 77 fi # Check to see if the programs really run. diff --git a/tests/cdemo-make.test b/tests/cdemo-make.test index 25416b0e4..7a357000c 100755 --- a/tests/cdemo-make.test +++ b/tests/cdemo-make.test @@ -13,7 +13,7 @@ fi if test -f ../cdemo/Makefile; then : else echo "You must run cdemo-conf.test before running $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/cdemo-shared.test b/tests/cdemo-shared.test index 4d6c15703..004baa9ac 100755 --- a/tests/cdemo-shared.test +++ b/tests/cdemo-shared.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1 +if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/cdemo-static.test b/tests/cdemo-static.test index b5bd23282..67eca2e24 100755 --- a/tests/cdemo-static.test +++ b/tests/cdemo-static.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-shared" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1 +if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/demo-conf.test b/tests/demo-conf.test index 0d0c784a0..edb77091c 100755 --- a/tests/demo-conf.test +++ b/tests/demo-conf.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../demo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1 +if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/demo-exec.test b/tests/demo-exec.test index bdf61bc07..0980d5a6d 100755 --- a/tests/demo-exec.test +++ b/tests/demo-exec.test @@ -13,7 +13,7 @@ fi if test -f ../demo/hell; then : else echo "You must run demo-make.test before running $0" 1>&2 - exit 1 + exit 77 fi # Check to see if the programs really run. diff --git a/tests/demo-inst.test b/tests/demo-inst.test index 419cafdfe..da47fc5d1 100755 --- a/tests/demo-inst.test +++ b/tests/demo-inst.test @@ -14,7 +14,7 @@ fi if test -f ../demo/hell; then : else echo "You must run demo-make.test before $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/demo-make.test b/tests/demo-make.test index ecd3446ca..8a4a4ba85 100755 --- a/tests/demo-make.test +++ b/tests/demo-make.test @@ -13,7 +13,7 @@ fi if test -f ../demo/Makefile; then : else echo "You must run demo-conf.test before running $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/demo-nofast.test b/tests/demo-nofast.test index e9c89e8b5..0115a81b2 100755 --- a/tests/demo-nofast.test +++ b/tests/demo-nofast.test @@ -27,4 +27,8 @@ rm -f config.cache echo "= Configuring in ../demo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --enable-fast-install=no || exit 1 +if egrep '^hardcode_action=relink' libtool > /dev/null; then + rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/demo-shared.test b/tests/demo-shared.test index 64ced1ffc..d3f3c987e 100755 --- a/tests/demo-shared.test +++ b/tests/demo-shared.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../demo (prefix=$prefix) with --disable-static" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-static || exit 1 +if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/demo-static.test b/tests/demo-static.test index 9508a9e31..f7e015891 100755 --- a/tests/demo-static.test +++ b/tests/demo-static.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../demo (prefix=$prefix) with --disable-shared" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-shared || exit 1 +if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/demo-unst.test b/tests/demo-unst.test index 65859f6aa..7928f5f80 100755 --- a/tests/demo-unst.test +++ b/tests/demo-unst.test @@ -10,11 +10,11 @@ if test -z "$srcdir"; then fi . $srcdir/defs || exit 1 -# Maybe we have a VPATH build, in which case, create a new subdir. +# Make sure it was installed already if test "$prefix/bin/hell"; then : else echo "You must run demo-inst.test before $0." 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/hardcode.test b/tests/hardcode.test index 3e6c7670c..d780ab612 100755 --- a/tests/hardcode.test +++ b/tests/hardcode.test @@ -2,7 +2,7 @@ # hardcode.test - check to see what the system linker hardcodes # Test script header. -need_prefix=yes # otherwise it will be removed, and build-relink fails +need_prefix=yes if test -z "$srcdir"; then srcdir=`echo "$0" | sed 's%/[^/]*$%%'` test "$srcdir" = "$0" && srcdir=. @@ -11,15 +11,12 @@ fi . $srcdir/defs || exit 1 # Check that things are built. -if test -f ../demo/hell; then : +if test -f $prefix/lib/libhello.la && cd ../demo; then : else - echo "You must run demo-make.test before $0" 1>&2 - exit 1 + echo "You must run demo-inst.test before $0" 1>&2 + exit 77 fi -# Change to our build directory. -cd ../demo || exit 1 - # Unfortunately, we need access to libtool internals for this test. objdir=NONE eval `egrep -e '^objdir=' ./libtool 2>/dev/null` diff --git a/tests/mdemo-conf.test b/tests/mdemo-conf.test index d74b13563..aa05fed83 100755 --- a/tests/mdemo-conf.test +++ b/tests/mdemo-conf.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../mdemo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix || exit 1 +if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/mdemo-exec.test b/tests/mdemo-exec.test index a7d241e42..037c0bd15 100755 --- a/tests/mdemo-exec.test +++ b/tests/mdemo-exec.test @@ -13,7 +13,7 @@ fi if test -f ../mdemo/mdemo; then : else echo "You must run mdemo-make.test before running $0" 1>&2 - exit 1 + exit 77 fi # Check to see if the programs really run. diff --git a/tests/mdemo-inst.test b/tests/mdemo-inst.test index fcd4025df..d0a748ab9 100755 --- a/tests/mdemo-inst.test +++ b/tests/mdemo-inst.test @@ -14,7 +14,7 @@ fi if test -f ../mdemo/mdemo; then : else echo "You must run mdemo-make.test before $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/mdemo-make.test b/tests/mdemo-make.test index d530d0af2..c54b907fc 100755 --- a/tests/mdemo-make.test +++ b/tests/mdemo-make.test @@ -13,7 +13,7 @@ fi if test -f ../mdemo/Makefile; then : else echo "You must run mdemo-conf.test before running $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/mdemo-shared.test b/tests/mdemo-shared.test index 9f1d3a557..3cbc2ffb3 100755 --- a/tests/mdemo-shared.test +++ b/tests/mdemo-shared.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-static" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-static || exit 1 +if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/mdemo-static.test b/tests/mdemo-static.test index b6ecb5ec3..c6f5562f4 100755 --- a/tests/mdemo-static.test +++ b/tests/mdemo-static.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-shared" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-shared || exit 1 +if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : +else rm -f Makefile && exit 77 +fi + exit 0 diff --git a/tests/mdemo-unst.test b/tests/mdemo-unst.test index 77c5d0ac0..3539ea0fe 100755 --- a/tests/mdemo-unst.test +++ b/tests/mdemo-unst.test @@ -10,11 +10,11 @@ if test -z "$srcdir"; then fi . $srcdir/defs || exit 1 -# Maybe we have a VPATH build, in which case, create a new subdir. +# Make sure it was installed already if test "$prefix/bin/hell"; then : else echo "You must run mdemo-inst.test before $0." 1>&2 - exit 1 + exit 77 fi # Change to our build directory.