I am working on tests. -- james
-----Original Message----- From: Marcus Borger [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 14, 2002 9:30 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: cvs: php4 / run-tests.php I think we must do something to the tests. We have either cgi (only this could test post/get) and cli which is available for whatever target you build. But they behave different: cli coes not change the execution directory cgi does whether i add -C or not. The problem is that all tests must have the same work directory. Either the directory of the script (.../ext/extname) or the directory of php (...php but then .../sapi/.../php). Now we have many tests that expect to work in director of php (php buil I changed one test and added echo getcwd()."\n"; as first test line. When run-test calls for cgi version it says /usr/src/php4/ext/exif when using cli it says /usr/src/php4 I tried to figure out where the path changes but i could not find. I got until call to ZE2 execute function and as expected the path was /usr/src/php4 so where and why does it change? Interesting is that i can call the test manually and when i add -C it works. [marcus@zaphod php4]$ /usr/src/php4/php -q ext/exif/tests/004.php /usr/src/php4/ext/exif/tests/004.php(8) : Warning - Unable to open './ext/exif/tests/test4.jpg' /usr/src/php4/ext/exif/tests/004.php(10) : Warning - Invalid argument supplied for foreach() /usr/src/php4/ext/exif/tests [marcus@zaphod php4]$ /usr/src/php4/php -C -q ext/exif/tests/004.php /usr/src/php4 last line of test is expected directory. A solution would be to add the execution directory to the environment of the test: putenv("PHP_DIR=".getcwd()); and change the directory in the test first ... --FILE-- <?php chdir($_ENV['PHP_DIR']); ... marcus At 03:54 12.04.2002, Yasuo Ohgaki wrote: Yasuo Ohgaki wrote: yohgaki Thu Apr 11 21:34:07 2002 EDT Modified files: /php4 run-tests.php Log: Enable CGI binary for testing. CGI binary should be used when it's available, since some tests cannot be performed by CLI. (And many of them are just failing now) Fixed SAPI and VERSION output. Additional comments. If you build CGI and "make test", tests does not run well. (Older behavior is using CLI always) ./php run-tests.php will results in better test results. Some test scripts are written work well for CLI only, some are work only with CGI. Test script writers are better to run tests for both CLI and CGI. When will new test suite be available? I hope it's soon. -- Yasuo Ohgaki -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php