#!/usr/bin/perl -w

mkdir "reports";

for ($_=128; $_<2048; $_+=32)
{
  next if(-f "reports/$_");
  my $content=`bash run.sh $_ 2>&1`;
  open OUT,">reports/$_";
  print OUT $content;
  close OUT;

  if($content=~m/Error/)
  {
    print "Error: $_\n";
  }
  else
  {
    print "Ok: $_\n";
  }

}
