diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-04-12 14:51:45 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-04-12 14:51:45 -0600 |
commit | a70f0c69f593a6bbf7b6b02e25988f509e8f058c (patch) | |
tree | 15cc7468e0e7ed65ef051d1b73620a33aaf7e2ab /mysql-test/mysql-test-run.sh | |
parent | b5fa754f7ba4b416e608cc624c596f89a9db84fd (diff) | |
parent | 4d4dbc94c2f386c36c5bcb64213bebb5693af208 (diff) | |
download | mariadb-git-a70f0c69f593a6bbf7b6b02e25988f509e8f058c.tar.gz |
Merge mysql.sashanet.com:/home/sasha/src/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
BitKeeper/triggers/post-commit:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
Diffstat (limited to 'mysql-test/mysql-test-run.sh')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 8c494d06f75..c5e20a35e8a 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -20,9 +20,31 @@ TZ=GMT-3; export TZ # for UNIX_TIMESTAMP tests to work PATH=/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin +# Standard functions + +which () +{ + DIRS=`echo $PATH | tr ":" " "` + for file + do + for dir in $DIRS + do + if test -f $dir/$file + then + echo "$dir/$file" + continue 2 + fi + done + echo "which: no $file in ($PATH)" + exit 1 + done +} + + # No paths below as we can't be sure where the program is! BASENAME=`which basename | head -1` +DIFF=`which diff | head -1` CAT=cat CUT=cut TAIL=tail @@ -268,6 +290,20 @@ prompt_user () read unused } +show_failed_diff () +{ + reject_file=r/$1.reject + result_file=r/$1.result + if [ -x "$DIFF" ] && [ -f $reject_file ] + then + echo "Below are the diffs between actual and expected results:" + echo "-------------------------------------------------------" + $DIFF -u $result_file $reject_file + echo "-------------------------------------------------------" + echo "Please e-mail the above, along with the output of mysqlbug" + echo "and any other relevant info to bugs@lists.mysql.com" + fi +} error () { $ECHO "Error: $1" @@ -660,6 +696,7 @@ run_testcase () $ECHO "$RES$RES_SPACE [ fail ]" $ECHO error_is + show_failed_diff $tname $ECHO if [ x$FORCE != x1 ] ; then $ECHO "Aborting. To continue, re-run with '--force'." |