selftest: Cope with empty testsuite results in more places.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 17 May 2010 23:39:17 +0000 (01:39 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 17 May 2010 23:40:20 +0000 (01:40 +0200)
selftest/format-subunit

index 17b3d1669f78b623eba06caa9e9257da5fb9c142..b4509ab1cfcfc4d56ab07547daf00c7293717471 100755 (executable)
@@ -157,7 +157,8 @@ class PlainFormatter(object):
 
             for suite in self.suitesfailed:
                 f.write("== %s ==\n" % suite)
-                f.write(self.test_output[suite]+"\n\n")
+                if suite in self.test_output:
+                    f.write(self.test_output[suite]+"\n\n")
 
             f.write("\n")
 
@@ -165,7 +166,8 @@ class PlainFormatter(object):
             for suite in self.suitesfailed:
                 print "=" * 78
                 print "FAIL: %s" % suite
-                print self.test_output[suite]
+                if suite in self.test_output:
+                    print self.test_output[suite]
                 print ""
 
         f.write("= Skipped tests =\n")