Mettere in pausa mysql-test-run.pl
Può capitare di aver bisogno di lavorare su un computer che è impegnato ad eseguire mysql-test-run.pl. In MariaDB 5.1 è stata aggiunta una nuova funzionalità allo script mysql-test-run.pl che permette di arrestarlo temporaneamente per poter svolgere altre attività e in seguito riavviarlo.
Ci sono due modi per farlo:
- Riga di comando: Le opzioni
--stop-file
e--stop-keep-alive
. - Variabili di ambiente: Se si chiama mysql-test-run.pl indirettamente
(per esempio da uno script o un programma come buildbot) è possibile impostare
MTR_STOP_FILE
eMTR_STOP_KEEP_ALIVE
.
Keep Alive
Se si prevede di utilizzare questa funzionalità attraverso altri programmi, come buildbot, si dovrebbe impostare la variabile di ambiente <code>MTR_STOP_KEEP_ALIVE</code> o l'opzione da riga di comando <code>--stop-keep-alive</code> con un valore in secondi. In questo modo lo script stamperà messaggi a qualsiasi programma sia chiamando mysql-test-run.pl nell'intervallo specificato, per evitare eventuali timeout.
Se si sta chiamando mysql-test-run.pl direttamente, non occorre preoccuparsi dei timeout.
The mysql-test-run stop file
The stop file is a temporary file that you create on your system when you want to pause the execution of mysql-test-run. When enabled via the command-line or environment variable options, mysql-test-run will periodically check for the existence of the file and if it exists it will stop until the file is no longer present.
Examples
Command-line:
mysql-test-run.pl --stop-file="/path/to/stop/file" --stop-keep-alive=120
Environment Variables:
export MTR_STOP_FILE="/path/to/stop/file" export MTR_STOP_KEEP_ALIVE=120 mysql-test-run.pl
Fixes
The following mysql-test-run bugs have been fixed in MariaDB 5.1:
- Windows: mysql-test-run --log-error fixed to not add --console.
- mysql-test-run sometimes terminated mysqld early, causing loss of memory leak error reports from Valgrind and GCov test coverage output