Re: problem running regression tests on NT4

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: problem running regression tests on NT4
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-2099@lists.php.net to get a copy of this message
I had to make the following changes to get the regression tests to work: On line 79, there is a test for a Windoze machine, and $php is set to point to php.exe in _the_current_directory_ and unless you have specifically copied it there, it won't find it. However the script is being run using the system binary (in C:\php4 or wherever). $php is also set to be "./php.exe" instead of ".\php.exe" Line 320, after the call to fgets( $line... ), $line will contain the "\n" at the end of the line, so the call to preg_match will ALWAYS fail. The preg_match needs to be changed to preg_match('/^--([A-Z]+)--/', $line, $matches) without the $ end fix. A side effect of preg_match always failing is that all the tests appear to run, and report success, because the tests run and produce empty output files, which when compared, always compare perfectly. Two empty files will always match. The only indication that the test was not run is that the description of the test is missing in the output. Note that the files are always opened in text format, not binary, this makes no difference under Unix, but under Windows, they should be opened in binary mode. Or, make sure your test files are saved in Unix format, which is what I do. Or, at about line 333, use: if( windows_p ) { $line = str_replace( "\r", "", $line ); } Hope some of the above helps... cheers -- jalal -- On Thu, 4 Jan 2001, Phil Driscoll wrote: > I've built 4.0.4pl1RC1 on NT4 - again with no problems, and again it seems > to work ok. > I can't seem to get the regression tests running here either. > My first problem was undefined index TOP_SRCDIR in run-tests at line 148, > so I tried passing TOP_SRCDIR in to the command line but I then get a > message stat filaed to TOP_SRCDIR=blah on line 128 > where blah is definitely the correct directory, tried with slashes in both > directions and with and without trailing slashes. > Any clues anyone? > > Cheers > -- > Phil Driscoll > Dial Solutions > +44 (0)113 294 5112 > http://www.dialsolutions.com > http://www.dtonline.org > > > > > -- > PHP Quality Assurance Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net > For additional commands, e-mail: php-qa-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.qa (#2099) next »