Send a blank email to [email protected] to get a copy of this message
Hi,
are there any env variable issues with run-tests.php and HEAD? I'm trying to port a simple test from PHP 5.3 and PHP 6.0 and I'm failing. This is my test:
nixnutz@ulflinux:~/php6> cat env.phpt
--TEST--
Env test
--SKIPIF--
<?php
if (false === getenv('FOO'))
die("skip FOO not set\n");
?>
--FILE--
<?php
var_dump(getenv('FOO'));
var_dump($_ENV['FOO']);
print "done!";
?>
--EXPECTF--
string(3) "bar"
string(3) "bar"
done!
In order to port it from PHP 5.3 to PHP 6.0, I'm running it with PHP 5.3 and PHP 6.0. PHP 6.0 is from CVS, like an hour ago. PHP 6.0 decides to skip the test whereas PHP 5.3 passes the test.
nixnutz@ulflinux:~/php6> export FOO='bar'; echo "FOO = " $FOO ; echo ""; sapi/cli/php run-tests.php --keep-all --verbose env.phpt ; cat env.out
PHP 6 -->
SKIP Env test [env.phpt] reason: FOO not set
PHP_VERSION : 6.0.0-dev
ZEND_VERSION: 3.0.0-dev
PHP_OS : Linux - Linux ulflinux 2.6.22.17-0.1-default #1 SMP 2008/02/10 20:01:04 UTC x86_64
PHP_OS : Linux - Linux ulflinux 2.6.22.17-0.1-default #1 SMP 2008/02/10 20:01:04 UTC x86_64
If you use --keep-all and run the generated files individually, all works fine. It looks a bit like a bug in run-tests.php::system_with_timeout().
If you play a bit with env variables and include files you'll find more weird things. In my testing PHP 6.0 does recognize an environment variable in a file included within the SKIPIF section. When the same file gets included again in the FILE section, the environment variable is not available.
Ulf