Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48790 invoked from network); 17 Mar 2010 16:17:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2010 16:17:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=foolistbar@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=foolistbar@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.220.152 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: foolistbar@googlemail.com X-Host-Fingerprint: 72.14.220.152 fg-out-1718.google.com Received: from [72.14.220.152] ([72.14.220.152:52276] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/78-05162-48001AB4 for ; Wed, 17 Mar 2010 11:17:08 -0500 Received: by fg-out-1718.google.com with SMTP id e21so532617fga.11 for ; Wed, 17 Mar 2010 09:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=NHdlzWbvBZ0f7XWMb9teMkQKhjdR5ZkkXe5HFJHbGFk=; b=n/CyfRiTtA8mRFGasznTBWFXklaZxGf+dJ6J80rotLLf09gjzq6w3xd4X3DDa1Q/YW JAsOm/QVm7pBs9t7uQy1aDsB9b4jrsLn/1jYH4hoA/cCYg6IShjAUZ2vjiTUpqZkYjjX v/ol8qq7a/6wsYXg/WuOycZi2bFnHFC3Uka1w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=CUaj4y/QprgsNOS3M0elpWJc+bOSWAivfjpn911rp5YQYQwP1KiWHQ7WUUK2wKklOv hnGGc+Fh1O4fc5Fhmm7DmKEfdRnwaQHu149qEx/9AicisZyzaAjIF5KshhJh0yrWvkLW WxFWYE6O+esNVaBuNogFzQg4lfPtO+FYYVjr0= Received: by 10.87.47.32 with SMTP id z32mr2320755fgj.36.1268842625741; Wed, 17 Mar 2010 09:17:05 -0700 (PDT) Received: from [192.168.12.3] (static-88.131.66.112.addr.tdcsong.se [88.131.66.112]) by mx.google.com with ESMTPS id 13sm5048464fxm.10.2010.03.17.09.17.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Mar 2010 09:17:04 -0700 (PDT) Cc: Hannes Magnusson , internals@lists.php.net Message-ID: To: jani.taskinen@iki.fi In-Reply-To: <4B9A2796.10002@iki.fi> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 17 Mar 2010 00:05:37 +0100 References: <4B9926E8.4080202@lerdorf.com> <4B995F83.1000605@prohost.org> <4B99639B.9030405@oracle.com> <4B996FC6.7040102@zend.com> <4B997381.1050300@oracle.com> <4B9A14FF.6000703@iki.fi> <7f3ed2c31003120229j51f4cad2w4b5be5fe753066c2@mail.gmail.com> <4B9A2796.10002@iki.fi> X-Mailer: Apple Mail (2.936) Subject: Re: [PHP-DEV] Tests repository From: foolistbar@googlemail.com (Geoffrey Sneddon) On 12 Mar 2010, at 12:37, Jani Taskinen wrote: > On 03/12/2010 12:29 PM, Hannes Magnusson wrote: >> On Fri, Mar 12, 2010 at 11:18, Jani Taskinen >> wrote: >>> Having tests in multiple branches is PITA. Hasn't anyone >>> considered that the >>> best way would be to move all tests into their own repository >>> (directory..whatever :) in SVN..? Considering they are supposed to >>> be used >>> for testing against regressions and BC breaks, they should always be >>> runnable using any PHP version? >> >> Thats actually a fairly good idea. >> >> Some tests however are not supposed to work in earlier releases, so >> we >> need to either add a new >> ==SKIP-VERSION== >> 5.2, 5.1, 5.0 > > Perhaps something like required min version is better. > > Any ideas who has been working on the improved test stuff? Or was > that just a dream? I'd rather just check for whether a feature exists or not, rather than hard-coding version numbers in tests. For example, hat happens if the PHP 5.3/6 case repeats itself, with more and more being backported? Do we need to go through and change skip-version metadata on hundreds of tests? Could we not just check that, e.g., "get_called_class" exists? With such feature testing (in skipif?) we could just do something along the lines of: ---FILE--- =') && function_exists('get_called_class')) echo 'PASS'; elseif (version_compare(PHP_VERSION, '5.3', '<') && ! function_exists('get_called_class')) echo 'PASS'; else echo 'FAIL'; ?> --EXPECTF-- PASS Then, through the magic of logic, we would be guaranteed to have the right results for each version if all tests pass, and only one place to change when backporting/removing a feature. -g