--- /root/porting/buildbot-0.7.5/buildbot/steps/shell.py	2006-12-11 05:40:12.000000000 +0000
+++ /usr/lib/python2.4/site-packages/buildbot/steps/shell.py	2007-07-18 17:10:32.000000000 +0100
@@ -271,3 +295,87 @@
     description = ["testing"]
     descriptionDone = ["test"]
     command = ["make", "test"]
+
+class BKBSelectiveTest(Test):
+ 
+    name = "Test"
+    description = ["testing"]
+    descriptionDone = ["test"]
+    warnOnFailure = 1
+
+    # Overridden method simple to include test filtering information in the
+    # command that we run and to support supressing code coverage information
+    # to aid testing speed
+    def start(self):
+        extraenv = {}
+
+        #
+        # See if the NV_TEST_FILTER property has been set. If it has, we want
+        # to pass it in the enviroment to the build slave and adjust the
+        # description of this step to indicate which tests we are running
+        #
+        try:
+            extraenv['NV_TEST_FILTER'] = self.getProperty('NV_TEST_FILTER')
+            description = ["testing (" + self.getProperty('NV_TEST_FILTER') + ")"]
+            descriptionDone = ["test (" + self.getProperty('NV_TEST_FILTER') + ")"]
+        except:
+            # todo - how do we do nothing here?
+            self.command = self.command
+
+        # Now see if we've been asked to suppress code coverage processing.
+        # If we have, this again needs to get passed in the environment to the
+        # slave.
+        try:
+            if "TRUE" == self.getProperty('NV_SUPPRESS_COVERAGE_PROCESSING'):
+                extraenv['NV_SUPPRESS_COVERAGE_PROCESSING'] = "TRUE"
+        except:
+            # todo - how do we do nothing here?
+            self.command = self.command
+
+        # Combine any enviroment we want to set with any that was already
+        # specified
+        if self.remote_kwargs.has_key('env') != True:
+            self.remote_kwargs['env'] = {}
+
+        self.remote_kwargs['env'].update(extraenv)
+
+        # Invoke the base class to actually carry out the shell command
+        ShellCommand.start(self)
+
+    def describe(self, done=False):
+        filter = None
+        try:
+            filter = self.getProperty('NV_TEST_FILTER')
+        except:
+            filter = None
+
+        if done is True:
+            word = "test"
+        else:
+            word = "testing"
+
+        if None != filter:
+            return [ word + " (" + filter + ")" ]
+        else:
+            return [ word ]
