Ricardo SIGNES > perl-5.19.0 > bisect.pl

Download:
perl-5.19.0.tar.gz

Annotate this POD

Website

Source   Latest Release: perl-5.21.3

NAME ^

bisect.pl - use git bisect to pinpoint changes

SYNOPSIS ^

    # When did this become an error?
    .../Porting/bisect.pl -e 'my $a := 2;'
    # When did this stop being an error?
    .../Porting/bisect.pl --expect-fail -e '1 // 2'
    # When were all lines matching this pattern removed from all files?
    .../Porting/bisect.pl --match '\b(?:PL_)hash_seed_set\b'
    # When was some line matching this pattern added to some file?
    .../Porting/bisect.pl --expect-fail --match '\buseithreads\b'
    # When did this test program stop exiting 0?
    .../Porting/bisect.pl -- ./perl -Ilib ../test_prog.pl
    # When did this test start failing?
    .../Porting/bisect.pl -- ./perl -Ilib t/TEST op/sort.t
    # When did this first become valid syntax?
    .../Porting/bisect.pl --target=miniperl --end=v5.10.0 \
         --expect-fail -e 'my $a := 2;'
    # What was the last revision to build with these options?
    .../Porting/bisect.pl --test-build -Dd_dosuid

DESCRIPTION ^

Together bisect.pl and bisect-runner.pl attempt to automate the use of git bisect as much as possible. With one command (and no other files) it's easy to find out

usually without needing to know which versions of perl to use as start and end revisions.

By default bisect.pl will process all options, then use the rest of the command line as arguments to list system to run a test case. By default, the test case should pass (exit with 0) on earlier perls, and fail (exit non-zero) on blead (note that running most of perl's test files directly won't do this, you'll need to run them through a harness to get the proper error code). bisect.pl will use bisect-runner.pl to find the earliest stable perl version on which the test case passes, check that it fails on blead, and then use bisect-runner.pl with git bisect run to find the commit which caused the failure.

Because the test case is the complete argument to system, it is easy to run something other than the perl built, if necessary. If you need to run the perl built, you'll probably need to invoke it as ./perl -Ilib ...

You need a clean checkout to run a bisect, and you can't use the checkout which contains Porting/bisect.pl (because git bisect) will check out a revision before Porting/bisect-runner.pl was added, which git bisect run needs). If your working checkout is called perl, the simplest solution is to make a local clone, and run from that. i.e.:

    cd ..
    git clone perl perl2
    cd perl2
    ../perl/Porting/bisect.pl ...

By default, bisect-runner.pl will automatically disable the build of DB_File for commits earlier than ccb44e3bf3be2c30, as it's not practical to patch DB_File 1.70 and earlier to build with current Berkeley DB headers. (ccb44e3bf3be2c30 was in September 1999, between 5.005_62 and 5.005_63.) If your db.h is old enough you can override this with -Unoextensions.

OPTIONS ^

syntax highlighting: