Re: com php-src: Skip test if directory does not exist: tests/security/open_basedir_001.phpt
| From: | Ferenc Kovacs | Date: | Thu, 15 Nov 2012 20:45:39 +0000 |
| Subject: | Re: com php-src: Skip test if directory does not exist: tests/security/open_basedir_001.phpt | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-70551@lists.php.net to get a copy of this message | ||
why not using create_directories() from open_basedir.inc ?
On Thu, Nov 15, 2012 at 12:49 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> it would be much better to use the current directory or root tests
> directory for this kind of tests. Maybe adding a kind of constant we
> can expand in run-tests.php?
>
> On Thu, Nov 15, 2012 at 12:28 PM, Johannes Schlüter <johannes@php.net>
> wrote:
> > Commit: 7468fc0e374ad8cd8db482e6c228cdaae8aed075
> > Author: Johannes Schlüter <johannes@php.net> Thu, 15 Nov
> 2012 12:28:19 +0100
> > Parents: f5d8b638c7864150db3e7d39ecf3808850c82e0f
> > Branches: PHP-5.3 PHP-5.4 PHP-5.5 master
> >
> > Link:
>
> http://git.php.net/?p=php-src.git;a=commitdiff;h=7468fc0e374ad8cd8db482e6c228cdaae8aed075
> >
> > Log:
> > Skip test if directory does not exist
> >
> > Would be good to run this using a directory which is existing
> > everywhere.
> >
> > Changed paths:
> > M tests/security/open_basedir_001.phpt
> >
> >
> > Diff:
> > diff --git a/tests/security/open_basedir_001.phpt
> b/tests/security/open_basedir_001.phpt
> > index e05861a..9ea9559 100644
> > --- a/tests/security/open_basedir_001.phpt
> > +++ b/tests/security/open_basedir_001.phpt
> > @@ -5,6 +5,9 @@ openbase_dir runtime tightning
> > if (substr(PHP_OS, 0, 3) == 'WIN') {
> > die('skip.. only for unix');
> > }
> > +if (!is_dir("/usr/local/bin")) {
> > + die('skip.. no /usr/local/bin on this machine');
> > +}
> > --INI--
> > open_basedir=/usr/local
> > --FILE--
> >
> >
> > --
> > PHP CVS Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net |
> http://www.libgd.org
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu