Req #55672 [Opn]: Autoguessing TEST_PHP_EXECUTABLE if none is provided in run-tests.php
| From: | shein@php.net | Date: | Thu, 15 Sep 2011 20:38:24 +0000 |
| Subject: | Req #55672 [Opn]: Autoguessing TEST_PHP_EXECUTABLE if none is provided in run-tests.php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163579@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55672&edit=1
ID: 55672
Updated by: shein@php.net
Reported by: shein@php.net
Summary: Autoguessing TEST_PHP_EXECUTABLE if none is provided
in run-tests.php
Status: Open
Type: Feature/Change Request
Package: *Configuration Issues
PHP Version: trunk-SVN-2011-09-12 (SVN)
Block user comment: N
Private report: N
New Comment:
This patch is not about guessing php executable that runs run-tests.php, but is
about php binary to be tested, these are often different binaries.
Previous Comments:
------------------------------------------------------------------------
[2011-09-12 14:19:26] laruence@php.net
how about use $0 ?
------------------------------------------------------------------------
[2011-09-12 12:29:48] shein@php.net
Description:
------------
Hello!
I've made some improvements to run-tests.php:
1) Autoguessing TEST_PHP_EXECUTABLE and TEST_PHP_CGI_EXECUTABLE if
they're not provided, i.e. assume they have value 'auto'. You can
still pass your own value as usual.
Autoguessing is done this way:
Looking for ./sapi/cli/php from the current directory, and, if not found
from directory where run-tests.php script is resides (Christofer Jones
suggestion).
php-cgi is looked for the same way.
2) Added option -n (use no php.ini) to the shebang line
(#!/usr/bin/php -n) so it would run more reliably on some hosts. My
Ubuntu setup did not have E letter in variables_order (i.e.
variables_order=GPCS) so $_ENV array was empty and some tests were
skipped when they could be run.
3) Some better error handling of wrong paths
So now you can run run-tests.php with just
$ ./run-tests.php ext
instead of
$ TEST_PHP_EXECUTABLE=auto php -n run-tests.php ext
You can also run run-tests.php from sub-dir, it will correctly guess
'auto' as well:
$ cd ext/
$ ../run-tests.php zlib
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55672&edit=1