Generated from ./rt/Source/roborun.pl with ROBODoc v4.0.18 on Mon Jan 19 22:49:19 2004

ROBOTester/roborun

FUNCTION

   Run all testcases, collect and analyse the output.

roborun/tester

FUNCTION

   The executable to run and list the testcases.

SOURCE

    my $tester = "./robotester";

roborun/run_testcase

FUNCTION

   Run a testcase and analyse the output to see if the
   testcase failed.  A testcase failed if the output contains
   the word "FAIL:" or when it does not contain the word 
   "COMPLETE:".

INPUTS

   o $name -- the name of the testcase to run.

SOURCE

    sub run_testcase {
        my $name = shift;
        my @output    = ();
        my $result    = "FAIL";
        my @failures  = ();
        my @complete  = ();
    
        print "-" x 75, "\n";
        printf("%-65s", $name);
        @output = `$tester run $name`;
        @failures = grep { $_ =~ m/^FAIL:/ } @output;
        @complete = grep { $_ =~ m/^COMPLETE:/ } @output;
        if ( ( scalar( @failures ) == 0 ) and 
             ( scalar( @complete ) == 1 ) ) {
            $result = "OK";
        }
        print "   $result\n";
        print "-" x 75, "\n";
        print @output;
    }