summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/Subunit.pm21
-rwxr-xr-xselftest/selftest.pl5
2 files changed, 26 insertions, 0 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm
index 2a9fc0e48b..fce8d0854a 100644
--- a/selftest/Subunit.pm
+++ b/selftest/Subunit.pm
@@ -176,6 +176,27 @@ sub report_time($)
printf "time: %04d-%02d-%02d %02d:%02d:%02d\n", $year+1900, $mon+1, $mday, $hour, $min, $sec;
}
+sub progress_pop()
+{
+ print "progress: pop\n";
+}
+
+sub progress_push()
+{
+ print "progress: push\n";
+}
+
+sub progress($;$)
+{
+ my ($count, $whence) = @_;
+
+ unless(defined($whence)) {
+ $whence = "";
+ }
+
+ print "progress: $whence$count\n";
+}
+
# The following are Samba extensions:
sub start_testsuite($)
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 7bbad62bbf..462fa752bc 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -228,6 +228,7 @@ sub run_testsuite($$$$$)
my ($envname, $name, $cmd, $i, $totalsuites) = @_;
my $pcap_file = setup_pcap($name);
+ Subunit::progress_push();
Subunit::start_testsuite($name);
Subunit::report_time(time());
@@ -250,6 +251,7 @@ sub run_testsuite($$$$$)
unless (close(RESULTS)) {
if ($!) {
Subunit::end_testsuite($name, "error", "Unable to run $cmd: $!");
+ Subunit::progress_pop();
return 0;
} else {
$ret = $?;
@@ -258,6 +260,7 @@ sub run_testsuite($$$$$)
if ($ret & 127) {
Subunit::end_testsuite($name, "error", sprintf("Testsuite died with signal %d, %s coredump", ($ret & 127), ($ret & 128) ? "with": "without"));
+ Subunit::progress_pop();
return 0;
}
my $envlog = getlog_env($envname);
@@ -276,6 +279,7 @@ sub run_testsuite($$$$$)
} else {
Subunit::end_testsuite($name, "failure", "Exit code was $exitcode");
}
+ Subunit::progress_pop();
cleanup_pcap($pcap_file, $exitcode);
@@ -685,6 +689,7 @@ foreach my $fn (@testlists) {
}
Subunit::testsuite_count($#available+1);
+Subunit::progress($#available+1);
Subunit::report_time(time());
foreach (@available) {