Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101727 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70165 invoked from network); 29 Jan 2018 22:41:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2018 22:41:34 -0000 Authentication-Results: pb1.pair.com header.from=nazar@mokrynskyi.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nazar@mokrynskyi.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mokrynskyi.com designates 46.4.12.50 as permitted sender) X-PHP-List-Original-Sender: nazar@mokrynskyi.com X-Host-Fingerprint: 46.4.12.50 mx.mokrynskyi.com Received: from [46.4.12.50] ([46.4.12.50:33294] helo=mx.mokrynskyi.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/DD-24062-713AF6A5 for ; Mon, 29 Jan 2018 17:41:28 -0500 Received: from localhost (localhost [127.0.0.1]) by mx.mokrynskyi.com (Postfix) with ESMTP id E6B6FEA55 for ; Mon, 29 Jan 2018 22:41:24 +0000 (UTC) Authentication-Results: mx.mokrynskyi.com (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=mokrynskyi.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mokrynskyi.com; h=content-language:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:organization:from :from:references:to:subject:subject; s=dkim; t=1517265684; x= 1518129685; bh=Oxo7LPAWUl8dWA16bWEQuRE3uUjCal1LTI+Zis1CmQw=; b=r R73wXNf5nLj9pBqKVQBOE15Hs/XQep7XFXioYfuSDShPPYsCEArinwHEGaB4A5BS XGVxtXlGWgbp9VxbZB17MSfIggqWHDGHChvf7IWOYWj9c7A//BPlQGGu+8YE+cuP xVZesYSWay67SMo5oRFSBdxJPNxvzNgUOddyhkM2/E= X-Virus-Scanned: Debian amavisd-new at mx.mokrynskyi.com Received: from mx.mokrynskyi.com ([127.0.0.1]) by localhost (mx.mokrynskyi.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fNA4wbuv7n0d for ; Mon, 29 Jan 2018 22:41:24 +0000 (UTC) Received: from [192.168.1.2] (bomann.znet.kiev.ua [176.122.88.128]) by mx.mokrynskyi.com (Postfix) with ESMTPSA id 79DEEEA10; Mon, 29 Jan 2018 22:41:24 +0000 (UTC) To: Matt Ficken Cc: PHP Internals References: Organization: CleverStyle, Ecoisme Message-ID: <0b2d12f4-388c-a3bf-cbbf-417a0f98b386@mokrynskyi.com> Disposition-Notification-To: Nazar Mokrynskyi Date: Tue, 30 Jan 2018 00:41:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Thunderbird/57.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------CF8411DE094971ED2370E013" Content-Language: en-US Subject: Re: [PHP-DEV] Potential adoption of run-tests.php replacement From: nazar@mokrynskyi.com (Nazar Mokrynskyi) --------------CF8411DE094971ED2370E013 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable It was never intended to be a wrapper or to be 100% compatible. It was created as a simpler and modern replacement with additional featur= es like colored output (tried to add this to run-tests.php initially, eve= n submitted PR with some fixes and refactoring, but found it too complex = to deal with) and simpler CLI interface to work with. It is intentionally missing a few PHPT sections that seem to be redundant= and have slight tweaks to some that are present. At the end of the day s= o many time have passed since run-tests.php was initially written. For instance, it is painful to work with tests in PHP source tree when th= ey are called 001.phpt, 002.phpt and so on - you need to open each file a= nd read it to see what it intends to test. My tool uses file names instea= d, which makes browsing source tree with tests more productive and makes = --TEST-- section redundant (simply ignored). This tool is 6.5 times smaller than run-tests.php and imho is better stru= ctured, which leads to lower cost for introducing new features when/if ne= eded. Sincerely, Nazar Mokrynskyi github.com/nazar-pc 30.01.18 00:10, Matt Ficken =D0=BF=D0=B8=D1=88=D0=B5: > This is a reimplementation of run-test.php, not just a wrapper (so its = another parser for the PHPT file format). However, its missing support fo= r many PHPT sections (ie its PHPT format support is incomplete). > > See: https://github.com/nazar-pc/phpt-tests-runner/blob/master/bin/phpt= -tests-runner#L117 > > > I created PFTT as a multi-SAPI (CLI, IIS/FastCGI, CLI-WWW, Apache) mult= iplatform test tool reimplementing PHPT and PHPUnit(and support for other= common tasks)... > > This may give you some clarification of what's missing > http://git.php.net/?p=3Dpftt2.git;a=3Dblob_plain;f=3Dsrc/com/mostc/pftt= /model/core/EPhptSection.java;hb=3Drefs/heads/master > > PFTT is a big heavyweight tool (so PFTT shouldn't be in core).=C2=A0 ru= n-tests.php is nice because its a lightweight tool, not overly complex an= d minimal to download, so I can easily do `make test` for a custom build.= .. its just not as good at seriously pounding PHP across multiple scenari= os, SAPIs, filesystems, etc... (built in part to hammer PHP on Windows to= ensure it works well).=C2=A0 Do we really need a 3rd PHPT engine? > > It also supports parallel execution (it tests many different scenarios,= so faster execution is critical)... that's a feature that's hard to get = right. > > -Regards > -M > > > On Mon, Jan 29, 2018 at 4:57 AM, Nazar Mokrynskyi > wrote: > > Hi internals, > > As most of you know, there is this script called run-tests.php whic= h is huge in size and hard to maintain. > > I also heard some wanted it to support parallel tests execution and= probably other things. > > There is a project I've created a long time ago and still maintaini= ng (https://github.com/nazar-pc/phpt-tests-runner ) that should be able to run most of the tests wi= thout changes already with colored output and the whole thing is a fracti= on of run-tests.php's size. > > How I'd like to work towards mainlining it into php-src in case the= re is a desire and an agreement on such transition. > > If this seems like a good idea, it would be very useful if someone = can enumerate the list of features that are currently used/needed from ru= n-tests.php and which replacement should offer, alongside with features o= n top that might be useful (like parallel execution). > > If there was similar discussion already and there is an accepted so= lution there, let me know. > > -- > Sincerely, Nazar Mokrynskyi > github.com/nazar-pc > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --------------CF8411DE094971ED2370E013--