diff -rN -u old-buildbot_only_PerlModuleTest/buildbot/process/factory.py new-buildbot_only_PerlModuleTest/buildbot/process/factory.py
--- old-buildbot_only_PerlModuleTest/buildbot/process/factory.py	2008-04-06 09:34:43.000000000 +0100
+++ new-buildbot_only_PerlModuleTest/buildbot/process/factory.py	2008-04-06 09:34:43.000000000 +0100
@@ -4,7 +4,7 @@
 from buildbot.process.base import Build
 from buildbot.process.buildstep import BuildStep
 from buildbot.steps.source import CVS, SVN
-from buildbot.steps.shell import Configure, Compile, Test
+from buildbot.steps.shell import Configure, Compile, Test, PerlModuleTest
 
 # deprecated, use BuildFactory.addStep
 def s(steptype, **kwargs):
@@ -81,7 +81,7 @@
         BuildFactory.__init__(self, [source])
         self.addStep(Configure, command=[perl, "Makefile.PL"])
         self.addStep(Compile, command=["make"])
-        self.addStep(Test, command=["make", "test"])
+        self.addStep(PerlModuleTest, command=["make", "test"])
 
 class Distutils(BuildFactory):
     def __init__(self, source, python="python", test=None):
diff -rN -u old-buildbot_only_PerlModuleTest/buildbot/status/web/waterfall.py new-buildbot_only_PerlModuleTest/buildbot/status/web/waterfall.py
--- old-buildbot_only_PerlModuleTest/buildbot/status/web/waterfall.py	2008-04-06 09:34:43.000000000 +0100
+++ new-buildbot_only_PerlModuleTest/buildbot/status/web/waterfall.py	2008-04-06 09:34:43.000000000 +0100
@@ -110,6 +110,8 @@
         number = b.getNumber()
         url = path_to_build(req, b)
         text = b.getText()
+        tests_failed = b.sumStepProperty('tests-failed')
+        if tests_failed: text.extend(["Failed tests: %d" % tests_failed])
         # TODO: maybe add logs?
         # TODO: add link to the per-build page at 'url'
         c = b.getColor()
diff -rN -u old-buildbot_only_PerlModuleTest/buildbot/steps/shell.py new-buildbot_only_PerlModuleTest/buildbot/steps/shell.py
--- old-buildbot_only_PerlModuleTest/buildbot/steps/shell.py	2008-04-06 09:34:43.000000000 +0100
+++ new-buildbot_only_PerlModuleTest/buildbot/steps/shell.py	2008-04-06 09:34:43.000000000 +0100
@@ -334,3 +334,47 @@
     description = ["testing"]
     descriptionDone = ["test"]
     command = ["make", "test"]
+
+class PerlModuleTest(Test):
+    command=["prove", "--lib", "lib", "-r", "t"]
+
+    def evaluateCommand(self, cmd):
+        lines = self.getLog('stdio').readlines()
+
+        re_test_result = re.compile("^(All tests successful)|(\d+)/(\d+) subtests failed|Files=\d+, Tests=(\d+),")
+
+        mos = map(lambda line: re_test_result.search(line), lines)
+        test_result_lines = [mo.groups() for mo in mos if mo]
+
+        if not test_result_lines:
+            return cmd.rc
+
+        test_result_line = test_result_lines[0]
+
+        success = test_result_line[0]
+
+        if success:
+            failed = 0
+
+            test_totals_line = test_result_lines[1]
+            total_str = test_totals_line[3]
+
+            rc = SUCCESS
+        else:
+            failed_str = test_result_line[1]
+            failed = int(failed_str)
+
+            total_str = test_result_line[2]
+
+            rc = FAILURE
+
+        total = int(total_str)
+        passed = total - failed
+
+        self.setStepProperty('tests-total', total)
+        self.setStepProperty('tests-failed', failed)
+        self.setStepProperty('tests-passed', passed)
+
+        self.warnings = failed
+
+        return rc
diff -rN -u old-buildbot_only_PerlModuleTest/buildbot/test/test_steps.py new-buildbot_only_PerlModuleTest/buildbot/test/test_steps.py
--- old-buildbot_only_PerlModuleTest/buildbot/test/test_steps.py	2008-04-06 09:34:43.000000000 +0100
+++ new-buildbot_only_PerlModuleTest/buildbot/test/test_steps.py	2008-04-06 09:34:43.000000000 +0100
@@ -639,3 +639,38 @@
                                  "treesize %d KiB" % kib)
         d.addCallback(_check)
         return d
+
+class PerlModuleTest(StepTester, unittest.TestCase):
+    def testAllTestsPassed(self):
+        self.masterbase = "Warnings.testAllTestsPassed"
+        step = self.makeStep(shell.PerlModuleTest)
+        output = \
+"""ok 1
+ok 2
+All tests successful
+Files=1, Tests=123, other stuff
+"""
+        log = step.addLog("stdio")
+        log.addStdout(output)
+        log.finish()
+        step.evaluateCommand(log)
+        self.failUnlessEqual(step.getStepProperty('tests-failed'), 0)
+        self.failUnlessEqual(step.getStepProperty('tests-total'), 123)
+        self.failUnlessEqual(step.getStepProperty('tests-passed'), 123)
+
+    def testFailures(self):
+        self.masterbase = "Warnings.testFailures"
+        step = self.makeStep(shell.PerlModuleTest)
+        output = \
+"""
+ok 1
+ok 2
+3/7 subtests failed
+"""
+        log = step.addLog("stdio")
+        log.addStdout(output)
+        log.finish()
+        step.evaluateCommand(log)
+        self.failUnlessEqual(step.getStepProperty('tests-failed'), 3)
+        self.failUnlessEqual(step.getStepProperty('tests-total'), 7)
+        self.failUnlessEqual(step.getStepProperty('tests-passed'), 4)
diff -rN -u old-buildbot_only_PerlModuleTest/docs/buildbot.texinfo new-buildbot_only_PerlModuleTest/docs/buildbot.texinfo
--- old-buildbot_only_PerlModuleTest/docs/buildbot.texinfo	2008-04-06 09:34:43.000000000 +0100
+++ new-buildbot_only_PerlModuleTest/docs/buildbot.texinfo	2008-04-06 09:34:43.000000000 +0100
@@ -206,7 +206,7 @@
 * Compile::                     
 * Test::                        
 * TreeSize::                    
-* Build Properties::            
+* Build Properties::
 
 Python BuildSteps
 
@@ -4475,7 +4475,8 @@
 * Compile::                     
 * Test::                        
 * TreeSize::                    
-* Build Properties::            
+* PerlModuleTest::
+* Build Properties::
 @end menu
 
 @node Configure, Compile, Simple ShellCommand Subclasses, Simple ShellCommand Subclasses
@@ -4531,7 +4532,7 @@
 This is meant to handle unit tests. The default command is @code{make
 test}, and the @code{warnOnFailure} flag is set.
 
-@node TreeSize, Build Properties, Test, Simple ShellCommand Subclasses
+@node TreeSize, PerlModuleTest, Test, Simple ShellCommand Subclasses
 @subsubsection TreeSize
 
 @bsindex buildbot.steps.shell.TreeSize
@@ -4541,8 +4542,17 @@
 aka 'KiB' or 'kibibytes') on the step's status text, and sets a build
 property named 'tree-size-KiB' with the same value.
 
+@node PerlModuleTest, Build Properties, TreeSize, Simple ShellCommand Subclasses
+@subsubsection PerlModuleTest
 
-@node Build Properties,  , TreeSize, Simple ShellCommand Subclasses
+@bsindex buildbot.steps.shell.PerlModuleTest
+
+This is a simple command that knows how to run tests of perl modules.
+It parses the output to determine the number of tests passed and
+failed and total number executed, saving the results for later query.
+
+
+@node Build Properties, , PerlModuleTest, Simple ShellCommand Subclasses
 @subsubsection Build Properties
 
 @cindex build properties
@@ -5339,7 +5349,7 @@
 
 
 
-@node BuildStep URLs,  , Adding LogObservers, Writing New BuildSteps
+@node BuildStep URLs, , Adding LogObservers, Writing New BuildSteps
 @subsubsection BuildStep URLs
 
 @cindex links


