RE: [PHP-QA] run-tests.php is broken
| From: | Preston L. Bannister | Date: | Sun, 01 Sep 2002 16:55:30 +0000 |
| Subject: | RE: [PHP-QA] run-tests.php is broken | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-5909@lists.php.net to get a copy of this message | ||
Ah, *now* I understand the point of confusion :).
One of the things I've learned from writing unit and regression tests is
that you want to be *very* wary of defaults. It is at least embarrassing
when a default wasn't what you expected (or intended).
Defaults are nice to have in your day-to-day working environment, but are
dangerous in a test environment.
Tests need to be exact. You need to know the *exact* compiled PHP
executable used in your tests. What that means is you always want to
*explicitly* specify the files used (executable, ini, etc.).
You also want to report the files used in the test log (as a sanity check).
Of course, *I* would never admit to shipping a product where the unit tests
ran against the wrong file ... :).
I'd love to put more time (if I had any spare) into run-tests and friends.
The PHP test suite has a long ways to go before it can reach the same level
as Perl's. Yasuo's comment is telling :).
-----Original Message-----
From: Sander Roobol [mailto:sander@php.net]
Sent: Sunday, September 01, 2002 5:33 AM
run-tests.php was never supposed to be run directly.
./run-tests.php doesn't have a hashbang line and it never had.
On Sun, Sep 01, 2002 at 09:09:44PM +0900, Yasuo Ohgaki wrote:
> Forgot to mention this.
>
> Running test script is not used during release process,
> but also during development.
>
> Changing behavior/usage of test scripts should be announced
> to php-dev. Otherwise, most developers will stop using it.
> (Well most of us are not using it now, though)
> >Sander Roobol wrote:
> >
> >>No it's not. Use e.g.
> >>TEST_PHP_EXECUTABLE=./sapi/cli/php ./sapi/cli/php -c ./php.ini-dist
> >>run-tests.php ext/pgsql/tests/*.phpt
> >>
> >>Yeah, that sucks. I know. Feel free to improve :)
> >>On Sun, Sep 01, 2002 at 09:44:56AM +0900, Yasuo Ohgaki wrote:
> >>>Due to some changes made run-tests.php is broken. (both 4.2.0 and HEAD)
> >>>
> >>>[yohgaki@dev DEV]$ ./run-tests.php ext/pgsql
> >>>./run-tests.php: ?php: