PATCH: mysql-test-run fix for missing /usr/bin/time
am 30.08.2002 12:47:55 von mmokrejsHi,
I tried make test on linux and I got errors about "command not found".
I figured out, when /usr/bin/time is not present, the script fails
completely.
How-To-Repeat:
$ mv /usr/bin/time /usr/bin/time-
$ ./mysql-test-run --force
Installing Test Databases
Removing Stale Files
Installing Master Databases
running ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables --basedir=. --datadir=./var/master-data --skip-innodb --skip-bdb --language=../sql/share/english/
020830 13:44:16 ../sql/mysqld: Shutdown Complete
Installing Slave Databases
running ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables --basedir=. --datadir=./var/slave-data --skip-innodb --skip-bdb --language=../sql/share/english/
020830 13:44:17 ../sql/mysqld: Shutdown Complete
Manager disabled, skipping manager start.
Starting MySQL daemon
Loading Standard Test Databases
Starting Tests
TEST USER SYSTEM ELAPSED RESULT
------------------------------------------------------------ ------------
alias .... .... .... [ fail ]
../mysql-test-run.ori: line 1: which:: command not found
Ending Tests
Shutting-down MySQL daemon
[...]
I suggest to add to mysql-test-run something like
if [ -z $TIME ] ; then
echo "Cannot find program time using 'which time' command! Exiting!"
exit 1
#echo "Cannot find program time using 'which time' command!"
#echo "ls -la /usr/bin/time"
#ls -la /usr/bin/time
#echo "Setting blindly \$TIME = \"time\""
#TIME=time
fi
I'm a bit fooled by the situation on our linux boxes:
$ /usr/bin/which time
$ /usr/bin/which /usr/bin/time
/usr/bin/time
$
However, it seems even when which returns no output, your which() function
in the script performs well. Because of that I propose the if loop as
above with the second part commented out. ;)
--
Martin Mokrejs
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12436@lists.mysql.com
To unsubscribe, e-mail