On 11/07/2016 04:05 AM, Mike South wrote:

On Sat, Nov 5, 2016 at 1:10 PM, mt1957 <mt1...@gmail.com <mailto:mt1...@gmail.com>> wrote:

    Hi,

    I've made a small test program to run a particular test file in an
    infinite loop until it fails. I was investigating some race
    problem in BSON and the test run was successful most of the time.
    I got some raw fingers to repeat the commands so this is the
    result, simple and maybe useful for others. It uses the perl5
    prove program which must be in your search path.


    use v6.c;

    sub MAIN ( Str:D $filename where (.IO ~~ :r and .IO !~~ :d) ) {

      my Proc $p;

      my Bool $success = True;
      while $success {
        $p = shell "prove --merge -v -e perl6 $filename";
        $success = $p.exitcode eq 0;
      }
    }


Hi Marcel,

Thanks for sharing!

For snippets of code like this that (a) other people might find useful and (b) I'm likely to want to find again many months later, I like to store them as a "gist" at github. Makes it easy for people to share, and you can search for it later if you want to dig it out again.

mike
Hi Mike,

I've done it!

See https://gist.github.com/MARTIMM/ and select prove-until-fail.pl6 <https://gist.github.com/MARTIMM/4376afd9877173443bdbd260e84a8f02>

Thanks,
marcel



    Happy testing,
    Marcel Timmerman



Reply via email to