2 messages in com.mysql.lists.bugsPATCH: mysql-test-run fix for missing...| From | Sent On | Attachments |
|---|---|---|
| Martin MOKREJŠ | 30 Aug 2002 03:47 | |
| Michael Widenius | 03 Sep 2002 08:18 |
| Subject: | PATCH: mysql-test-run fix for missing /usr/bin/time![]() |
|---|---|
| From: | Martin MOKREJŠ (mmok...@natur.cuni.cz) |
| Date: | 08/30/2002 03:47:33 AM |
| List: | com.mysql.lists.bugs |
Hi,
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 <mmok...@natur.cuni.cz>, <m.mo...@gsf.de> PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs MIPS / Institute for Bioinformatics <http://mips.gsf.de> 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




