diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index fbd4abab992..be93f3581cc 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -19,9 +19,6 @@ import cloudstackConnection import asyncJobMgr import dbConnection from cloudstackAPI import * -import random -import string -import hashlib ''' @Desc : CloudStackTestClient is encapsulated class for getting various \ diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index 2a749f09a9e..d5d02910643 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -33,6 +33,18 @@ class MarvinPlugin(Plugin): name = "marvin" def configure(self, options, config): + """enable the marvin plugin when the --with-marvin directive + is given to nose. The enableOpt value is set from the command line directive + and self.enabled (True|False) determines whether marvin's tests will run. + By default non-default plugins like marvin will be disabled + """ + if hasattr(options, self.enableOpt): + if not getattr(options, self.enableOpt): + self.enabled = False + return + else: + self.enabled = True + self.logformat = logging.Formatter("%(asctime)s - %(levelname)s - " + "%(name)s - %(message)s")