Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101948 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98457 invoked from network); 1 Mar 2018 22:24:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2018 22:24:55 -0000 Authentication-Results: pb1.pair.com header.from=themattficken@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=themattficken@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: themattficken@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-io0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:36463] helo=mail-io0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/02-16517-7BD789A5 for ; Thu, 01 Mar 2018 17:24:55 -0500 Received: by mail-io0-f180.google.com with SMTP id e30so8834997ioc.3 for ; Thu, 01 Mar 2018 14:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KXKrfvJFsik8p/SfBc6RPsSJg8UPIGKGWFi7MpZHs3Y=; b=hhBGt4VGvyVGBqza7BgQ6IvlaEZ7gCv36vqT/dc2UO0h9Bp8AowzIeezlv5GRwuBEP +zm+fgRA4JyEEXup6t8V/Q8l7YxMGfyuHaF7jvoWi1Cpr8QyaRMjMDz0oQ8NhQr+Fix0 H8sLjdrhAWMdJ7svPFmRHxajngkmLTob6MOsF9oIVzwHqAmTr6iaC5rEyuc8Qx8m0xkq tZ4FohYu858WtdYVKL21huzAR9PglSdSNDFnS/q6TMyzQKI9CVEXrjFIsxuz4h/s4ie7 OyIee55qt3Y26HJgXxb+nawReyBnThmIsssXDibZATO9QM9WDJzMSx/HgQnwkd05FaSR rMzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KXKrfvJFsik8p/SfBc6RPsSJg8UPIGKGWFi7MpZHs3Y=; b=ovcYY08YZTZ52bePcLDEZWxcThaLp9VYIuQk+yEJizSxsyfvrdi5DpI1v4Gx7MzptN 6betDS/HTKAPteuO3YyndFvDuFiiL+VQeM+6Tn5kfe51C30cFjQ1PoACCttbFa+UQXgo 1QzYOvpprDbBSAFj6E4DsDbSZByOe0vVGF+fXVBTH2u6FtYXecucSTAMWaw0bLkSCdsT zA9UwG3VcZcbjtiOV9hv2SYreGILYfO65DH6I3JAT++v+bTKuBCLBQxiidahlQ5tvuGD YorOrvAxSv9mHoya3E4sdZYqyUfKHjG81FL1pkufk/GXCHXfS+c0Xh5DpVkhhbxDJ2mp 7ZQQ== X-Gm-Message-State: AElRT7EbIkNuliR6WJJllIPrDCxY/AYla6f48J2yIxhQFx+14ZRcryk0 2X5XPgnj5ktyNty2Q7eE2chksPAmR1LNolU9IRQ= X-Google-Smtp-Source: AG47ELsfQP3TutTnLAbEILvRnb+TJi9iEUVnMZLmkpA2EEzWbx7oMq/FzRY704ciQhIZvc00rciea2VvOFupS7It+Ks= X-Received: by 10.107.35.7 with SMTP id j7mr3777526ioj.226.1519943092339; Thu, 01 Mar 2018 14:24:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.13.135 with HTTP; Thu, 1 Mar 2018 14:24:51 -0800 (PST) In-Reply-To: References: <72f70269-c6db-db86-43c4-8b69def88d34@gmail.com> Date: Thu, 1 Mar 2018 14:24:51 -0800 Message-ID: To: Anatol Belski Cc: Stanislav Malyshev , PHP Internals Content-Type: multipart/alternative; boundary="001a1140e8a8190949056661541b" Subject: Re: [PHP-DEV] run-tests.php exit code From: themattficken@gmail.com (Matt Ficken) --001a1140e8a8190949056661541b Content-Type: text/plain; charset="UTF-8" If behavior wasn't changed unless ENV var or CLI option was specified, then I think it can go into 7.1 (run-test.php isn't production code part of a build, etc...). Behavior remaining the same of course wouldn't break anybody's existing CI. For those who benefit from this in 7.3, they should benefit for 7.1 and 7.2 which we have to provide the same level of support for a couple of years still. Also, ENV var could be TRUE to change behavior, or could be a string, in which case the exit code is non-zero only if a failing test's name contains that string. That would allow some CI scripts to only focus on certain tests, extensions, etc.... That would be easy to add. That wouldn't help me but I just thought of that and maybe it helps somebody else. Regards -M On Thu, Mar 1, 2018 at 2:15 AM, Anatol Belski wrote: > Hi Stas, > > > -----Original Message----- > > From: Stanislav Malyshev [mailto:smalyshev@gmail.com] > > Sent: Wednesday, February 28, 2018 9:26 PM > > To: PHP Internals > > Subject: [PHP-DEV] run-tests.php exit code > > > > Hi! > > > > When running tests with run-tests.php, if the tests fail, the script > will exit with > > non-zero exit code, but only if REPORT_EXIT_STATUS is set. This was the > case > > since 2002 when this capability has been introduced. > > > > I think it would be nice if we reversed the default and made the script > use exit > > code by default, unless NO_EXIT_STATUS is set. All usages of this script > that I > > know (including our own CI suite) use this setting, and I don't think > there's a > > good case for not using it. I think it makes sense to default to the > common use > > case. So: > > > > 1. Does it make sense to change the default? > I've stumbled upon this a couple of times, too, especially when writing > new scripts for non core test automation. IMO, given today there's much > more automation than ever, defaulting to the exit code translation makes > sense. Test fails should not be subtle by default at any levels. > > > 2. Do we want RFC for it? > IMHO not really deserving an RFC. > > > 3. Can we put it in 7.1 or do we want to wait for 7.3? > > > If someone doesn't use it on CI already, that's probably just a blessed > ignorance as the tests runs would always pass. Depends if we want the > change to be going more soft for some non core CI tests and avoid confusion > on manual test runs as in some cases an additional output could be > produced. Given it's in many cases harder to investigate failures on CI, > perhaps 7.3 would be safe to put it with the corresponding documentation, > etc. > > Regarding the option itself, we'd probably not need to introduce a new > one. Instead, a piece like below could be put at the top > > If (getenv("REPORT_EXIT_STATUS") === false) putenv("REPORT_EXIT_STATUS=1") > ; > > Regards > > Anatol > --001a1140e8a8190949056661541b--