develooper Front page | perl.perl5.porters | Postings from February 2020

Re: How to bisect for first commit at which a test passes?

Thread Previous
From:
Karen Etheridge
Date:
February 1, 2020 19:50
Subject:
Re: How to bisect for first commit at which a test passes?
Message ID:
CAPJsHfBQBHrUvm3o4FeedmjH8Bsyr_wivvRHBht+E6QP34BRJg@mail.gmail.com
On Sat, Feb 1, 2020 at 9:18 AM James E Keenan <jkeenan@pobox.com> wrote:
>
> I'm having trouble figuring out how to use Porting/bisect.pl to identify
> the first point at which, with given configuration options, a file in
> the test suite began to pass.

It looks like --expect-fail differentiates between the error and
failure states, not between good and bad exit values.

I would use a wrapper script (or one-liner if that's easier) that
called the .t file and inverts its $? to give the results that git
bisect expects -- zero for the test fails (i.e. a "good" result for
bisect), and non-zero for the test passing (a "bad" result for bisect)
-- and pass that wrapper to bisect.pl instead of the .t file itself.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About