diff options
author | Gary V. Vaughan <gary@gnu.org> | 2012-10-04 22:54:55 +0700 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2012-10-05 16:34:43 +0700 |
commit | e24f18306f92f7b31aa20f713924b740c0c850bc (patch) | |
tree | 861272e60492d712aab88f7cedffd6c993194e9a /tests | |
parent | 1a5b2496799401c736f652704b0f1fa817e21d11 (diff) | |
download | libtool-e24f18306f92f7b31aa20f713924b740c0c850bc.tar.gz |
tests: remove last vestiges of the legacy test harness.
All legacy tests have been fully migrated to Autotest, so
no need to cling to the legacy scaffolding any more.
* tests/defs.m4sh: Delete file.
* configure.ac (AM_INIT_AUTOMAKE): Remove unused color-tests and
parallel-tests options.
* Makefile.am (defs_m4sh, defs_in, defs, TESTS): Remove.
Adjust all dependencies.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/defs.m4sh | 376 |
1 files changed, 0 insertions, 376 deletions
diff --git a/tests/defs.m4sh b/tests/defs.m4sh deleted file mode 100644 index 0b9ed38f..00000000 --- a/tests/defs.m4sh +++ /dev/null @@ -1,376 +0,0 @@ -AS_INIT[]m4_divert_push([HEADER-COPYRIGHT]) -# defs -- Defines for Libtool testing environment. -# -# Copyright (C) 2003-2005, 2007-2012 Free Software Foundation, Inc. -# Written by Gord Matzigkeit, 1996 -# Rewritten by Gary V. Vaughan, 2003 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#### - -m4_divert_pop -m4_include([general.m4sh]) - -M4SH_VERBATIM([[ -: ${AUTOCONF="autoconf"} -: ${AUTORECONF="autoreconf"} -: ${LIBTOOL="./libtool"} - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# Disable usage of config.site for autoconf, unless DJGPP is present. -# The DJGPP port of autoconf requires config.site, to work correctly. -if test -z "$DJGPP"; then - CONFIG_SITE=/nonexistent -fi - -# How verbose should we be? Default is test output in log file. -# Setting VERBOSE=debug puts the shell in debug mode. -debug_cmd=: -case $VERBOSE in -DEBUG | debug ) - debug_cmd='set -x' - $debug_cmd - ;; -esac - -# func_msg arg... -# Echo message with prefix. -func_msg () -{ - func_echo "=== " ${1+"$@"} -} - -# func_skip arg... -# Echo message to standard error, and skip the rest of this test. -func_skip () -{ - func_error ${1+"$@"} - exit $EXIT_SKIP -} - -# func_fail arg... -# Echo message to standard error, and fail this test. -func_fail () -{ - func_fatal_error ${1+"$@"} -} - -# func_get_config varname_list src [failp] [regex] -func_get_config () -{ - $debug_cmd - - my_varname_list=$1 - my_src=$2 - my_failp=false; test -z "$3" || my_failp=: - my_regex=$4 - - my_exitp=false - if test -z "$my_regex"; then - my_regex='^(' - my_build_regex=: - else - my_build_regex=false - fi - my_first=: - - for my_varname in $my_varname_list; do - if $my_build_regex; then - $my_first || my_regex="$my_regex|" - my_first=false - my_regex=$my_regex$my_varname - fi - eval $my_varname=NONE - done - $my_build_regex && my_regex="$my_regex)=" - eval `eval "$my_src" | eval "$EGREP \"$my_regex\""` - - for my_varname in $my_varname_list; do - if eval test x\"\$$my_varname\" = xNONE; then - func_error "$my_varname not set in \`$my_src'" - $my_failp && my_exitp=: - fi - done - - $my_exitp && exit $EXIT_FAILURE -} - - -# Extract some variables from the libtool configuration. -func_get_config "objext -objdir -CC -host -host_os -host_alias -build -build_alias" "$LIBTOOL --config" ": fatal" - - -# func_mkprefixdir -func_mkprefixdir () -{ - $debug_cmd - - # An absolute path to a test installation directory. - func_mkdir_p "$prefix" - prefix=`cd $prefix && pwd` -} - -# func_rmprefixdir -func_rmprefixdir () -{ - $debug_cmd - - test -d "$prefix" && rm -rf "$prefix" - prefix=NONE -} - -# func_cd dir -# Make sure a directory exists, and then change to it. -func_cd () -{ - $debug_cmd - - my_dir=$1 - - # Maybe we have a VPATH build, in which case, create a new subdir. - func_mkdir_p "$my_dir" - - # Change to our build directory. - cd "$my_dir" || func_fatal_error "couldn't cd to \`$my_dir'" -} - - -# func_require prereq file [...] -# If FILE does not exist, give a fatal error regarding running PREREQ first. -func_require () -{ - $debug_cmd - - my_prereq=$1; shift - my_files=${1+"$@"} - - for my_file in $my_files; do - test -f "$my_file" \ - || func_skip "You must run $my_prereq.test before running $0" - done -} - -# func_configure_nofail [args ...] -# Configure the demonstration. -func_configure_nofail () -{ - $debug_cmd - - my_args=${1+"$@"} - func_dirname_and_basename "`pwd`" - my_dir=$func_basename_result - my_testdir=$abs_srcdir/tests/$my_dir - conf_status=$EXIT_FAILURE - - test -n "$my_args" && my_args=" $my_args" - my_args=--srcdir=\"$my_testdir\"" "--prefix=\"$prefix\"$my_args - test -n "$host_alias" && my_args=$my_args" "--host=\"$host_alias\" - test -n "$build_alias" && my_args=$my_args" "--build=\"$build_alias\" - - func_msg "Configuring in $my_dir" - - test -f "$my_testdir/configure" || $AUTORECONF --force --install $my_testdir - if test -f "$my_testdir/configure"; then - - eval func_msg $SHELL "$my_testdir/configure" $my_args - if eval $SHELL "$my_testdir/configure" $my_args; then - conf_status=$EXIT_SUCCESS - else - func_msg "FAILED: Configuring in $my_testdir" - ls -ltr $my_testdir - fi - fi -} - -# func_configure [args ...] -# Configure the demonstration, fail on error. -func_configure () -{ - func_configure_nofail ${1+"$@"} - if test "$conf_status" -eq "$EXIT_FAILURE"; then - exit $EXIT_FAILURE - fi -} - -# func_check_static_shared staticp sharedp -# Determine whether the generated libtool script is configured properly -# for the expected STATICP and SHAREDP library building -func_check_static_shared () -{ - $debug_cmd - - my_staticp=$1 - my_sharedp=$2 - - if func_grep "^build_old_libs=$staticp" libtool && - func_grep "^build_libtool_libs=$sharedp" libtool; then : - else - rm -f Makefile - exit $EXIT_FAIL - fi -} - - -# func_make [args ...] -# Do the actual build. -func_make () -{ - $debug_cmd - - my_args=${1+"$@"} - func_dirname_and_basename "`pwd`" - func_msg "Running \`$MAKE $my_args' in $func_basename_result" - - eval $MAKE $my_args || exit $EXIT_FAIL -} - - -# func_distclean -# Possibly clean up the distribution. -func_make_distclean () -{ - $debug_cmd - - if test -f Makefile; then - func_make distclean - fi - rm -rf autom4te.cache config.cache -} - - -# func_make_uninstall -# See that there were no files leftover in $prefix. -# Ignore dotfiles, so that .nfsXXX files don't screw up the test. -func_make_uninstall () -{ - $debug_cmd - - func_make uninstall - - leftovers=`find $prefix ! -type d ! -name '.*' -print` - if test -n "$leftovers"; then - func_msg "Leftover after make uninstall:" - ls -l $leftovers - exit 1 - fi -} - - -# func_exec_init mode -func_exec_init () -{ - $debug_cmd - - func_dirname_and_basename "`pwd`" - func_msg "Executing $1 programs in $func_basename_result" - - # Windows hosts search for dlls in the command path - PATH=$prefix/lib:$PATH - - exec_status=$EXIT_SUCCESS -} - -# func_exec_check program [msg ...] -# Check to see if PROGRAM was built. If not display MSG. -func_exec_check () -{ - $debug_cmd - - my_program=$1 - - if test -f "$my_program"; then : - else - shift - func_error "$0: $my_program did not build ${1+$@}" - exec_status=$EXIT_FAILURE - fi -} - -# func_exec program [exp_output] [msg ...] -# Check to see if PROGRAM really runs, and produces EXP_OUTPUT if given. -# If not display MSG. -func_exec () -{ - $debug_cmd - - my_program=$1 - my_exp_output=$2 - func_dirname_and_basename "`pwd`" - my_dir=$func_basename_result - - test -n "$my_exp_output" \ - && my_exp_output="| $EGREP -e "\"$my_exp_output\" - - if eval $my_program $my_exp_output; then : - else - shift - test -z "$1" || shift - func_error "$0: cannot execute $my_program ${1+$@}" - - if test "$build" != "$host"; then - func_msg "This may be ok since you seem to be cross-compiling." - exec_status=$EXIT_SKIP - else - # Simple check to see if they are superuser. - if test "$exec_status" = "$EXIT_FAILURE" || test -w /; then : - else - func_msg "You may need to run $0 as the superuser." - fi - exec_status=$EXIT_FAILURE - fi - fi -} - -# Shared global variables for test scripts -prefix=./_inst-`echo "$0" | sed 's|.*/||; s|-.*||'` -abs_srcdir=`cd '@srcdir@' && pwd` -abs_macro_dir=`cd '@srcdir@/@macro_dir@' && pwd` -abs_aux_dir=`cd '@srcdir@/@aux_dir@' && pwd` -scripts="$abs_aux_dir/ltmain.m4sh $abs_srcdir/libtoolize.m4sh" - -# Unset some MAKE... variables that may cause $MAKE to act like a -# recursively invoked sub-make. Any $MAKE invocation in a test is -# conceptually an independent invocation. -unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO - -# On AIX, shared libraries remain loaded in memory after use if they -# are world-readable, until root issues slibclean. On NFS, this causes -# a testsuite rerun to fail to clean up test group directories. Avoid -# this with a suitable umask. Do not do this on other systems, for -# example HP-UX suffers unless shared libraries are mode 555. -case $host_os in -aix*) umask o-rwx ;; -esac - -func_msg "Running $progname" - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -]]) |