From bbb484049e13dd8c4ca3316aec0e3def9919240d Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 19 Mar 1999 17:58:53 +0000 Subject: [PATCH] * tests/*.test: when a test fails, skip tests that depend on it. If a certain configuration is not supported, skip all its tests. --- ChangeLog | 5 +++++ tests/build-relink.test | 7 ++----- tests/cdemo-conf.test | 5 +++++ tests/cdemo-exec.test | 2 +- tests/cdemo-make.test | 2 +- tests/cdemo-shared.test | 5 +++++ tests/cdemo-static.test | 5 +++++ tests/demo-conf.test | 5 +++++ tests/demo-exec.test | 2 +- tests/demo-inst.test | 2 +- tests/demo-make.test | 2 +- tests/demo-nofast.test | 4 ++++ tests/demo-shared.test | 5 +++++ tests/demo-static.test | 5 +++++ tests/demo-unst.test | 4 ++-- tests/depdemo-conf.test | 5 +++++ tests/depdemo-exec.test | 2 +- tests/depdemo-inst.test | 2 +- tests/depdemo-make.test | 2 +- tests/depdemo-nofast.test | 4 ++++ tests/depdemo-shared.test | 5 +++++ tests/depdemo-static.test | 5 +++++ tests/depdemo-unst.test | 9 +++------ tests/hardcode.test | 11 ++++------- tests/mdemo-conf.test | 5 +++++ tests/mdemo-exec.test | 2 +- tests/mdemo-inst.test | 2 +- tests/mdemo-make.test | 2 +- tests/mdemo-shared.test | 5 +++++ tests/mdemo-static.test | 5 +++++ tests/mdemo-unst.test | 4 ++-- 31 files changed, 97 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9f1577a0..26b44d3ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +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. + 1999-03-19 Alexandre Oliva * doc/libtool.texi: reorder tests to reflect execution order 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/depdemo-conf.test b/tests/depdemo-conf.test index 7a3e5bf0b..750b75a14 100755 --- a/tests/depdemo-conf.test +++ b/tests/depdemo-conf.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../depdemo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --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/depdemo-exec.test b/tests/depdemo-exec.test index 5e6868f2a..16bc4c152 100755 --- a/tests/depdemo-exec.test +++ b/tests/depdemo-exec.test @@ -13,7 +13,7 @@ fi if test -f ../depdemo/depdemo; then : else echo "You must run depdemo-make.test before running $0" 1>&2 - exit 1 + exit 77 fi # Check to see if the programs really run. diff --git a/tests/depdemo-inst.test b/tests/depdemo-inst.test index 66c544ff5..2c666deea 100755 --- a/tests/depdemo-inst.test +++ b/tests/depdemo-inst.test @@ -14,7 +14,7 @@ fi if test -f ../depdemo/depdemo; then : else echo "You must run depdemo-make.test before $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/depdemo-make.test b/tests/depdemo-make.test index c61e7cb94..5f9b6e8ca 100755 --- a/tests/depdemo-make.test +++ b/tests/depdemo-make.test @@ -13,7 +13,7 @@ fi if test -f ../depdemo/Makefile; then : else echo "You must run depdemo-conf.test before running $0" 1>&2 - exit 1 + exit 77 fi # Change to our build directory. diff --git a/tests/depdemo-nofast.test b/tests/depdemo-nofast.test index d0ac1a315..606f34186 100755 --- a/tests/depdemo-nofast.test +++ b/tests/depdemo-nofast.test @@ -27,4 +27,8 @@ rm -f config.cache echo "= Configuring in ../depdemo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --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/depdemo-shared.test b/tests/depdemo-shared.test index ebe9c60e9..a5503366b 100755 --- a/tests/depdemo-shared.test +++ b/tests/depdemo-shared.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../depdemo (prefix=$prefix) with --disable-static" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --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/depdemo-static.test b/tests/depdemo-static.test index cce2e875b..e2c982ab3 100755 --- a/tests/depdemo-static.test +++ b/tests/depdemo-static.test @@ -27,4 +27,9 @@ rm -f config.cache echo "= Configuring in ../depdemo (prefix=$prefix) with --disable-shared" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --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/depdemo-unst.test b/tests/depdemo-unst.test index 52635c808..aaf87bd10 100755 --- a/tests/depdemo-unst.test +++ b/tests/depdemo-unst.test @@ -10,16 +10,13 @@ if test -z "$srcdir"; then fi . $srcdir/defs || exit 1 -# Maybe we have a VPATH build, in which case, create a new subdir. -if test "$prefix/bin/hell"; then : +# Make sure it was installed already +if test "$prefix/bin/hell" && cd ../depdemo; then : else echo "You must run depdemo-inst.test before $0." 1>&2 - exit 1 + exit 77 fi -# Change to our build directory. -cd ../depdemo || exit 1 - echo "= Running $make uninstall in ../depdemo" $make uninstall || exit 1 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. -- 2.47.3