Ticket #347 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Test step appends "no test results" over and over

Reported by: warner Owned by: warner
Priority: critical Milestone: 0.7.10
Version: 0.7.9 Keywords:
Cc: djc, tjc, thijs

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

comment:1 Changed 5 years ago 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!

comment:2 follow-up: ↓ 3 Changed 5 years ago by djc

  • Cc djc added

This is biting us, too.

comment:3 in reply to: ↑ 2 Changed 5 years ago by wangdong

Replying to djc:

This is biting us, too.

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

comment:4 Changed 4 years ago by mue

I tried the patch and can confirm that it works.

comment:5 Changed 4 years ago by djc

This really makes buildbot kind of useless. Could it get fixed, please?

comment:6 Changed 4 years ago by tjc

Why can't this relatively trivial patch be applied? Is development actually on-going? I can't see any changes in the last 4+ months in the source browser :(

comment:7 Changed 4 years ago by tjc

  • Cc tjc added

comment:8 Changed 4 years ago by dustin

  • Keywords review added

Sorry, I didn't see this 'cuz it's not kw'd "review"

comment:9 Changed 4 years ago by thijs

  • Cc thijs added

Thanks for the patch, that 'no test results' was awkward and is gone now. Though it's still reporting successful builds when in fact they should be reported as failed, as described in #275

comment:10 Changed 4 years ago by dustin

  • Keywords review removed
  • Status changed from new to closed
  • Resolution set to fixed

Sorry, this was committed, but I forgot to close the bug:

commit a3c7af35410d2ed4aa4a238f653ebf51197f7760
Author: Brian Warner <warner-buildbot@lothar.com>
Date:   Tue Jan 6 11:49:18 2009 -0500

    (closes #347) 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.
Note: See TracTickets for help on using tickets.