"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "runtest" between
dejagnu-1.6.tar.gz and dejagnu-1.6.1.tar.gz

About: DejaGnu is a framework for testing other programs.

runtest  (dejagnu-1.6):runtest  (dejagnu-1.6.1)
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, # Copyright (C) 1992-2016 Free Software Foundation, Inc.
# 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# #
# This file is part of DejaGnu. # This file is part of DejaGnu.
# #
# DejaGnu is free software; you can redistribute it and/or modify it # DejaGnu is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or # the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# DejaGnu is distributed in the hope that it will be useful, but # DejaGnu is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of # WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 28 skipping to change at line 27
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with DejaGnu; if not, write to the Free Software Foundation, # along with DejaGnu; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. # Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
# This script was written by Rob Savoye. The script finds the proper # This script was written by Rob Savoye. The script finds the proper
# expect shell and then starts DejaGnu. # expect shell and then starts DejaGnu.
# Get the execution path to this script and the current directory. # Get the execution path to this script and the current directory.
mypath=${0-.} mypath=${0-.}
if expr ${mypath} : '.*/.*' > /dev/null if expr "$mypath" : '.*/.*' > /dev/null
then then
: :
else else
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH for dir in $PATH
do do
test -z "$dir" && dir=. test -z "$dir" && dir=.
if test -x $dir/$mypath if test -x "$dir/$mypath"
then then
mypath=$dir/$mypath mypath="$dir/$mypath"
break break
fi fi
done done
IFS="$save_ifs" IFS="$save_ifs"
fi fi
execpath=`echo ${mypath} | sed -e 's@/[^/]*$@@'` execpath=$(echo "$mypath" | sed -e 's@/[^/]*$@@')
# Get the name by which runtest was invoked and extract the config # Get the name by which runtest was invoked and extract the config
# triplet. # triplet.
runtest=`echo ${mypath} | sed -e 's@^.*/@@'` runtest=$(echo "$mypath" | sed -e 's@^.*/@@')
target=`echo $runtest | sed -e 's/-runtest$//'` target=$(echo "$runtest" | sed -e 's/-runtest$//')
if [ "$target" != runtest ] ; then if [ "$target" != runtest ] ; then
target="--target ${target}" target="--target ${target}"
else else
target="" target=""
fi fi
# Find the right expect binary to use. If a variable EXPECT exists, it # Find the right expect binary to use. If a variable EXPECT exists, it
# takes precedence over all other tests. Otherwise look for a freshly # takes precedence over all other tests. Otherwise look for a freshly
# built one, and then use one in the path. # built one, and then use one in the path.
if [ x"$EXPECT" != x ] ; then if [ -n "$EXPECT" ] ; then
expectbin=$EXPECT expectbin="$EXPECT"
else else
if [ -x "$execpath/expect" ] ; then if [ -x "$execpath/expect" ] ; then
expectbin=$execpath/expect expectbin="$execpath/expect"
else else
expectbin=expect expectbin=expect
fi fi
fi fi
# Just to be safe .. # Just to be safe ..
if [ -z "$expectbin" ]; then if [ -z "$expectbin" ]; then
echo "ERROR: No expect shell found" echo "ERROR: No expect shell found"
exit 1 exit 1
fi fi
# This wrapper script will set up run-time library search PATHs. # This wrapper script will set up run-time library search PATHs.
skipping to change at line 90 skipping to change at line 89
if [ -x "$expectbin-bld.sh" ]; then if [ -x "$expectbin-bld.sh" ]; then
expectbin="${CONFIG_SHELL-/bin/sh} $expectbin-bld.sh" expectbin="${CONFIG_SHELL-/bin/sh} $expectbin-bld.sh"
fi fi
# Extract a few options from the option list. # Extract a few options from the option list.
verbose=0 verbose=0
debug="" debug=""
for a in "$@" ; do for a in "$@" ; do
case $a in case $a in
-v|--v|-verb*|--verb*) verbose=`expr $verbose + 1`;; -v|--v|-verb*|--verb*) verbose=$((verbose + 1)) ;;
-D0|--D0) debug="-D 0" ;; -D0|--D0) debug="-D 0" ;;
-D1|--D1) debug="-D 1" ;; -D1|--D1) debug="-D 1" ;;
esac esac
done done
if expr $verbose \> 0 > /dev/null ; then if expr "$verbose" \> 0 > /dev/null ; then
echo Expect binary is $expectbin echo Expect binary is "$expectbin"
fi fi
# Find runtest.exp. First we look in its installed location, # Find runtest.exp. First we look in its installed location,
# otherwise start if from the source tree. # otherwise start if from the source tree.
# #
# runtest.exp is found in @datadir@ (set by configure), but $execpath # runtest.exp is found in @datadir@ (set by configure), but $execpath
# is @bindir@. We're assuming that: # is @bindir@. We're assuming that:
# #
# @datadir@ == @bindir@/../share # @datadir@ == @bindir@/../share
# or # or
# @datadir@ == @bindir@/../../share # @datadir@ == @bindir@/../../share
# #
# .. which is a very weak assumption # .. which is a very weak assumption
for i in `echo ${execpath} | sed -e 's@/[^/]*$@/share/dejagnu@'` `echo ${execpa for i in \
th} | sed -e 's@/[^/]*/[^/]*$@/share/dejagnu@'` $execpath /usr/share/dejagnu /u $(echo "$execpath" | sed -e 's@/[^/]*$@/share/dejagnu@') \
sr/local/share/dejagnu ; do $(echo "$execpath" | sed -e 's@/[^/]*/[^/]*$@/share/dejagnu@') \
if expr $verbose \> 1 > /dev/null ; then "$execpath" \
echo Looking for $i/runtest.exp. /usr/share/dejagnu \
/usr/local/share/dejagnu ; do
if expr "$verbose" \> 1 > /dev/null ; then
echo Looking for "$i"/runtest.exp.
fi fi
if [ -f $i/runtest.exp ] ; then if [ -f "$i/runtest.exp" ] ; then
runpath=$i runpath="$i"
if expr $verbose \> 0 > /dev/null ; then if expr "$verbose" \> 0 > /dev/null ; then
echo Using $i/runtest.exp as main test driver echo Using "$i"/runtest.exp as main test driver
fi fi
break break
fi fi
done done
# Check for an environment variable. # Check for an environment variable.
if [ x"$DEJAGNULIBS" != x ] ; then if [ -n "$DEJAGNULIBS" ] ; then
runpath=$DEJAGNULIBS runpath="$DEJAGNULIBS"
if expr $verbose \> 0 > /dev/null ; then if expr "$verbose" \> 0 > /dev/null ; then
echo Using $DEJAGNULIBS/runtest.exp as main test driver echo Using "$DEJAGNULIBS"/runtest.exp as main test driver
fi fi
fi fi
if [ x"$runpath" = x ] ; then if [ -z "$runpath" ] ; then
echo "ERROR: runtest.exp does not exist" echo "ERROR: runtest.exp does not exist"
exit 1 exit 1
fi fi
if ! type $expectbin >/dev/null 2>/dev/null ; then if ! type "$expectbin" > /dev/null 2> /dev/null ; then
echo "ERROR: unable to find expect on the PATH" echo "ERROR: unable to find expect in the PATH"
exit 1 exit 1
fi fi
exec $expectbin $debug -- $runpath/runtest.exp $target ${1+"$@"} exec "$expectbin" $debug -- "$runpath"/runtest.exp $target ${1+"$@"}
 End of changes. 17 change blocks. 
32 lines changed or deleted 34 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)