Freddy Vulto c86b336769 (testuite) Fix tests to run with autotools' make distcheck
File locations are prefixed with `$::srcdir' so that `make distcheck' can
execute the test suite using a relative path.

The current working directory is removed from the test-suite-bash-prompt.

Furthermore, no more dynamic creation of files in dir $::srcdir/fixtures since
this dir is read-only during `make distcheck'.  Instead create dynamic files in
$TESTDIR/tmp

The test suite uses these "directory" variables

   tcl            bash          description
   ------------   -----------   ------------------------------------
   $::srcdir      $SRCDIR       where `fixtures' reside, relative
   $::srcdirabs   $SRCDIRABS    where `fixtures' reside, absolute
   $::TESTDIR     $TESTDIR      where `runtest' is invoked, absolute
2010-11-12 23:35:36 +01:00

42 lines
1.2 KiB
Bash

# bashrc file for DejaGnu testsuite
# Use emacs key bindings
set -o emacs
# Use bash strict mode
set -o posix
# Unset `command_not_found_handle' as defined on Debian/Ubuntu, because this
# troubles and slows down testing
unset -f command_not_found_handle
# Set fixed prompt `/@'
TESTDIR=$(pwd)
export PS1='/@'
export PS2='> '
# Configure readline
export INPUTRC=$SRCDIR/config/inputrc
# When not running via cron, avoid escape junk at beginning of line from
# readline, see e.g. http://bugs.gentoo.org/246091
[ "$CRON" ] || export TERM=dummy
# Ensure enough columns so expect doesn't have to care about line breaks
stty columns 150
# Also test completions of system administrator commands, which are
# installed via the same PATH expansion in `bash_completion.have()'
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
# Make sure default settings are in effect
unset -v \
COMP_CONFIGURE_HINTS \
COMP_CVS_REMOTE \
COMP_KNOWN_HOSTS_WITH_HOSTFILE \
COMP_TAR_INTERNAL_PATHS
# Load bash testsuite helper functions
. $SRCDIR/lib/library.sh
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh