Ticket #347 (new defect)

Opened 2 months ago

Last modified 3 days ago

Test step appends "no test results" over and over

Reported by: warner Assigned to: warner
Priority: critical Milestone: 0.7.10
Component: other Version: 0.7.9
Keywords: Cc: djc

Description

The Test step is modifying a class-level list in place (with append), and as a result, each time a build has no test results, all builds which use a Test step will have an increasing number of copies of "no test results" appear in their descriptions. Oops.

The fix is the following patch:

--- old-TRUNK/buildbot/steps/shell.py	2008-09-17 11:36:01.000000000 -0700
+++ new-TRUNK/buildbot/steps/shell.py	2008-09-17 11:36:01.000000000 -0700
@@ -116,9 +116,9 @@
         """
 
         if done and self.descriptionDone is not None:
-            return self.descriptionDone
+            return list(self.descriptionDone)
         if self.description is not None:
-            return self.description
+            return list(self.description)
 
         properties = self.build.getProperties()
         words = self.command
@@ -401,8 +401,6 @@
                     description.append('%d warnings' % warnings)
                 if failed:
                     description.append('%d failed' % failed)
-            else:
-                description.append("no test results")
         return description
 
 class PerlModuleTest(Test):

(I removed the append("no test results") call because a lot of installations use the Test step without a test parser, and "no test results" is not really adding a lot of information.)

Change History

10/02/08 23:18:05 changed by tjc

#359 was created as a result of this problem, although I have now closed it as a duplicate. The patch above fixed it. I hope this can make it into a new release of buildbot soon!

(follow-up: ↓ 3 ) 11/06/08 08:31:17 changed by djc

  • cc set to djc.

This is biting us, too.

(in reply to: ↑ 2 ) 11/16/08 18:24:44 changed by wangdong

Replying to djc:

This is biting us, too.

me2, and if the tests results may appends over and over.