Last active
August 29, 2015 14:06
-
-
Save dwarring/12c1e32440a8aea43337 to your computer and use it in GitHub Desktop.
Bisection for parrot failures of advent-2010-day14.t etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rakudo bisections on parrot | |
# david warring 15-09-2014 | |
# -------------------------- | |
sub capture-said($code) { | |
my $output = ''; | |
temp $*OUT = class { | |
method print(*@args) { | |
$output ~= @args.join; | |
} | |
} | |
$code(); | |
return $output.lines; | |
} | |
my @out = capture-said {say "lah lah lah..." }; | |
my $bisection = 2; | |
# --- bisection 1 --- | |
# - this stopped capturing output on parrot | |
# good: 65db2a6df4ffb08e3eb1d5fc68563ce2dc6c455e | |
# bad: f97cc9dbe9659d70a0fb41957b1f9bf5682e82b1 | |
say "captured: /{@out}/"; | |
exit( "{@out}" ~~ /lah/ ?? 0 !! 1) | |
if $bisection == 1; | |
# -- bisection 2 --- | |
# hang in capture-said(); statement: return $output.lines | |
# good: c3bd133cbd86286681dcb0f16cba507d3aecf60b | |
# bad: 2ad5b8e3e4006b204826424fa48341387ecf6bec | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: Test::plan() [and roast] were broken on parrot for much of the bisections.
I used the above gist and the following shell script to bisect: