On Thu, 24 Oct 2002, Hartmut Holzgraefe wrote:

> comments? ;)

sure :)

> 
> -----8<---------------------------------
> Index: run-tests.php
> ===================================================================
> RCS file: /repository/php4/run-tests.php,v
> retrieving revision 1.83
> diff -u -2 -r1.83 run-tests.php
> --- run-tests.php       23 Oct 2002 12:54:57 -0000      1.83
> +++ run-tests.php       24 Oct 2002 09:26:06 -0000
> @@ -83,4 +83,6 @@
>   }
> 
> +$php = realpath($php);
> +
>   // Check whether a detailed log is wanted.
>   if (getenv('TEST_PHP_DETAILED')) {
> @@ -425,4 +427,5 @@
> 
>          // Reset environment from any previous test.
> +       putenv("USER_AGENT=run-tests.php");
>          putenv("REDIRECT_STATUS=");
>          putenv("QUERY_STRING=");
> @@ -437,7 +440,8 @@
>                  if (trim($section_text['SKIPIF'])) {
>                          save_text($tmp_skipif, $section_text['SKIPIF']);
> -                       $output = `$php $tmp_skipif`;
> +                       putenv("PATH_TRANSLATED=$tmp_skipif");
> +                       $output = `$php -q $tmp_skipif`;
>                          @unlink($tmp_skipif);
> -                       if (ereg("^skip", trim($output))){
> +                       if (ereg("^skip", $output)){

This trim was added for a reason, did you check if that broke any tests?

>                                  echo "SKIP $tested";
>                                  $reason = (ereg("^skip[[:space:]]*(.+)\$", trim(
> $output))) ? ereg_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FAL
> SE;
> @@ -478,5 +482,5 @@
> 
>          // We've satisfied the preconditions - run the test!
> -       save_text($tmp_file,$section_text['FILE']);
> +       save_text($tmp_file,"<?php chdir('".getcwd()."'); ?>" . 
>$section_text['FILE']);

This change is going to break some tests, but you just volunteerd to fix 
those:

13:07 <hartmut> oh, yes ... pathes in the phpt files get easier again ... ;)
13:07 <@Derick> you can only do this if you fix all the tests too :)
13:07 <hartmut> this was intentional, i only forgot it ;)
13:07 <hartmut> yes, but that makes standalone tests for phpized extensions possible
13:07 <@Derick> I think it's better to cwd() to the php4/ dir then, where 
run-tests.php is
13:08 <hartmut> so i volunteer

furthermore I propose to apply this patch after pre2, so that we have 
more time to adjust the affected scripts where needed.

regards,
Derick


--

---------------------------------------------------------------------------
 Derick Rethans                                   http://derickrethans.nl/ 
 JDI Media Solutions
--------------[ if you hold a unix shell to your ear, do you hear the c? ]-


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to