Bug #60981 [PATCH]: Shell environment inaccessible in tests
| From: | tyrael@php.net | Date: | Tue, 07 Feb 2012 20:36:39 +0000 |
| Subject: | Bug #60981 [PATCH]: Shell environment inaccessible in tests | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-167274@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60981&edit=1
ID: 60981
Patch added by: tyrael@php.net
Reported by: david at davidfavor dot com
Summary: Shell environment inaccessible in tests
Status: Assigned
Type: Bug
Package: Testing related
Operating System: Ubuntu 11.10
PHP Version: 5.3.10
Assigned To: danielc
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: run-tests.php.diff
Revision: 1328646999
URL: https://bugs.php.net/patch-display.php?bug=60981&patch=run-tests.php.diff&revision=1328646999
Previous Comments:
------------------------------------------------------------------------
[2012-02-07 17:08:03] david at davidfavor dot com
Just tested supplied patch and seems to work well.
------------------------------------------------------------------------
[2012-02-07 15:57:10] tyrael@php.net
The following patch has been added/updated:
Patch Name: run-tests.php.diff
Revision: 1328630230
URL: https://bugs.php.net/patch-display.php?bug=60981&patch=run-tests.php.diff&revision=1328630230
------------------------------------------------------------------------
[2012-02-07 15:55:42] tyrael@php.net
"--d variable_orders=EGPCS to run-tests"
if you mean adding that to Makefile.global (the Makefile template, which will
run run-tests.php when you execute make test) then yeah, it is an elegant
solution, but I think it would be better to fix run-tests.php itself, so for
those who call it directly (half of the core/qa people...) will also be fixed.
Pierre told me that there is no clean way to fetch all environment vars from a
php script if $_ENV isn't populated (you could parse it from the output of
phpinfo() but that would be error-prone and messy).
So I would propose calling another php instance and fetching the environment
variables from there using shell_exec.
See the attached patch.
(If somebody has a better idea, I'm all for it.)
------------------------------------------------------------------------
[2012-02-07 15:20:06] david at davidfavor dot com
Seems like adding --d variable_orders=EGPCS to run-tests is the most elegant.
What the next step to arrange for this bug to be fixed?
Also I notice there are 4 failures in the mysqli tests. Let me know how to
register as a developer with php.net and I'll figure these out and supply
patches to fix the test suite.
Thanks.
------------------------------------------------------------------------
[2012-02-07 15:03:35] tyrael@php.net
'Both php.ini-production and php.ini-development contain "GPCS".'
the default value means that what is the value if you don't set it any way (having
no php.ini or using php -n for example)
unfortunately the default values and our developer/production inis aren't in sync,
I brought that issue up on the mailing list in the past:
http://www.mail-archive.com/internals@lists.php.net/msg52262.html
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=60981
--
Edit this bug report at https://bugs.php.net/bug.php?id=60981&edit=1