selftest: Print reason when a test fails unexpectedly
authorKai Blin <kai@samba.org>
Wed, 13 Jan 2010 09:07:25 +0000 (10:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 13 Jan 2010 13:51:58 +0000 (14:51 +0100)
selftest/output/plain.pm

index 066cacfb2941414cf4cd45f6af5e5fcd92400633..eae1e7aaac27f9b9057d24e45a09cab871ef1919 100644 (file)
@@ -162,7 +162,9 @@ sub end_test($$$$$)
                return;
        }
 
-       $append = "UNEXPECTED($result): $testname\n";
+       chomp $reason;
+
+       $append = "UNEXPECTED($result): $testname\nREASON: $reason\n";
 
        $self->{test_output}->{$self->{NAME}} .= $append;