2 # Convenience functions for writing output expected by the buildfarm
3 # Copyright (C) 2009 Jelmer Vernooij <jelmer@samba.org>
4 # Published under the GNU GPL, v3 or later
10 @EXPORT_OK = qw(start_testsuite end_testsuite skip_testsuite summary);
14 sub start_testsuite
($$)
16 my ($name, $duration) = @_;
19 $out .= "--==--==--==--==--==--==--==--==--==--==--\n";
20 $out .= "Running test $name (level 0 stdout)\n";
21 $out .= "--==--==--==--==--==--==--==--==--==--==--\n";
22 $out .= scalar(localtime())."\n";
23 $out .= "SELFTEST RUNTIME: " . $duration . "s\n";
24 $out .= "NAME: $name\n";
29 sub end_testsuite
($$$$$)
31 my ($name, $duration, $ok, $output, $reason) = @_;
34 $out .= "TEST RUNTIME: " . $duration . "s\n";
38 $out .= "ERROR: $reason\n";
40 $out .= "==========================================\n";
42 $out .= "TEST PASSED: $name\n";
44 $out .= "TEST FAILED: $name (status $reason)\n";
46 $out .= "==========================================\n";
55 print "SKIPPED: $name\n";
62 print "DURATION: " . $duration . " seconds\n";