mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
marvin: enable the nose-marvin plugin using the --with-marvin directive
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" This fixes regression from 03830c5 Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
9300d4a3ba
commit
ddf4dfa60a
@ -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 \
|
||||
|
||||
@ -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")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user