Re: com php-src: Made test compatible with O+: Zend/tests/bug55156.phpt Zend/tests/ns_026.phpt ext/phar/tests/create_new_and_modify.phpt
ext/phar/tests/delete_in_phar.phpt ext/phar/tests/delete_in_phar_confirm.phpt ext/phar/tests/tar/create_new_a...
| From: | Dmitry Stogov | Date: | Sun, 17 Mar 2013 06:17:40 +0000 |
| Subject: | Re: com php-src: Made test compatible with O+: Zend/tests/bug55156.phpt Zend/tests/ns_026.phpt ext/phar/tests/create_new_and_modify.phpt ext/phar/tests/delete_in_phar.phpt ext/phar/tests/delete_in_phar_confirm.phpt ext/phar/tests/tar/create_new_a... |
||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-71585@lists.php.net to get a copy of this message | ||
Hi Stas,
That sleep()s are used only if you run tests with O+ enabled.
Rhey used only in ~10 phar relate tests that update on the fly and include
the same files.
With cache enabled these files has to have different modification times.
Actually, we may just disable O+, but my goal was to check O+ with the
whole php test suite.
Moving the code in separate file may make sense.
Thanks. Dmitry.
On Sat, Mar 16, 2013 at 9:42 PM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:
> Hi!
>
> > Commit: e9641141aaad136757af06fddd6d870147ac2000
> > Author: Dmitry Stogov <dmitry@zend.com> Sat, 16 Mar 2013
> 16:11:00 +0400
> > Parents: 92430bcf5dd76bf9b12363693efcc471b3527618
> > Branches: PHP-5.5 master
> >
> > Link:
>
> http://git.php.net/?p=php-src.git;a=commitdiff;h=e9641141aaad136757af06fddd6d870147ac2000
> >
> > Log:
> > Made test compatible with O+
>
> +if (function_exists("opcache_get_status")) {
> + $status = opcache_get_status();
> + if ($status["opcache_enabled"]) {
> + ini_set("opcache.revalidate_freq", "0");
> + sleep(2);
> + }
> +}
>
> Why we need sleep here? Our tests are not too fast anyway, but adding so
> many sleeps will add another 20-30 secs to the run, can't we do without
> it? Also, doesn't it make sense to put this code into some file and not
> copy it into every test separately?
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>