Florian Ragwitz > perl-5.17.4 > bisect.pl


Annotate this POD


Source   Latest Release: perl-5.19.9


bisect.pl - use git bisect to pinpoint changes


    # 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 did this stop matching?
    .../Porting/bisect.pl --match '\b(?:PL_)hash_seed_set\b'
    # When did this start matching?
    .../Porting/bisect.pl --expect-fail --match '\buseithreads\b'
    # When did this test program stop working?
    .../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 \
    # What was the last revision to build with these options?
    .../Porting/bisect.pl --test-build -Dd_dosuid


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


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.


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 ...



syntax highlighting: