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; |
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:
#!/bin/bash
echo "running...";
# this wont work across nqp versions
perl Configure.pl --backends=parrot && make && timeout 30s ./perl6-p /tmp/gistfile1.txt;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bisection 2 Result ($output.lines hanging on parrot):
df2f8b4954477f02f2481f981a7d7c564a959544 is the first bad commit
commit df2f8b4954477f02f2481f981a7d7c564a959544
Author: Elizabeth Mattijsen liz@dijkmat.nl
Date: Fri Sep 12 12:59:30 2014 +0200
:040000 040000 3b5860369a482fd16ced846dedc56ea700636af3 0722f61921540008f55746d6814dad3c87066af6 M src
bisect run success