From fa30245c81d8a4412d4d10a44d84fb43cc6c6b1e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Apr 2001 15:46:50 +0300 Subject: Added intern which functions to benchmarks Docs/manual.texi: Update about benchmarks mysql-test/mysql-test-run.sh: Added intern which functions --- mysql-test/mysql-test-run.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'mysql-test/mysql-test-run.sh') diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 5bb005b60de..1ee2786e2a2 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -20,6 +20,27 @@ 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` -- cgit v1.2.1 From 4d4dbc94c2f386c36c5bcb64213bebb5693af208 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Apr 2001 13:46:19 -0600 Subject: BitKeeper/triggers/post-commit do REAL_EMAIL magic mysql-test/mysql-test-run.sh added show_failed_diffs mysql-test/r/bench_count_distinct.result tired of waiting :-) mysql-test/r/rpl000001.result new test results after implementing Monty's Hack (TM) mysql-test/t/bench_count_distinct.test tired of waiting mysql-test/t/rpl000001.test implemented Monty's Hack (TM) to kill a query in the middle of update without generating a table with 30,000 rows. This will also avoice the timing uncertainty BitKeeper/triggers/post-commit: do REAL_EMAIL magic mysql-test/mysql-test-run.sh: added show_failed_diffs mysql-test/r/bench_count_distinct.result: tired of waiting :-) mysql-test/r/rpl000001.result: new test results after implementing Monty's Hack (TM) mysql-test/t/bench_count_distinct.test: tired of waiting mysql-test/t/rpl000001.test: implemented Monty's Hack (TM) to kill a query in the middle of update without generating a table with 30,000 rows. This will also avoice the timing uncertainty --- mysql-test/mysql-test-run.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/mysql-test-run.sh') diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 1ee2786e2a2..9342e30f1a1 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -44,6 +44,7 @@ which () # 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 @@ -283,6 +284,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" @@ -675,6 +690,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'." -- cgit v1.2.1