mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-3075: Test names appended with <module>-<testname>
Prevent chained appending of the testclass/testnames to the accounnt names. Signed-off-by: Prasanna Santhanam <tsp@apache.org> (cherry picked from commit fb75f51755a2a0f28766f3e15b3e349151c85334)
This commit is contained in:
parent
2d55914e70
commit
a75a62a318
@ -104,6 +104,7 @@ class MarvinPlugin(Plugin):
|
|||||||
Plugin.options(self, parser, env)
|
Plugin.options(self, parser, env)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.identifier = None
|
||||||
Plugin.__init__(self)
|
Plugin.__init__(self)
|
||||||
|
|
||||||
def prepareTestRunner(self, runner):
|
def prepareTestRunner(self, runner):
|
||||||
@ -118,7 +119,7 @@ class MarvinPlugin(Plugin):
|
|||||||
|
|
||||||
def loadTestsFromTestCase(self, cls):
|
def loadTestsFromTestCase(self, cls):
|
||||||
if cls.__name__ != 'cloudstackTestCase':
|
if cls.__name__ != 'cloudstackTestCase':
|
||||||
self.testclient.identifier = cls.__name__
|
self.identifier = cls.__name__
|
||||||
self._injectClients(cls)
|
self._injectClients(cls)
|
||||||
|
|
||||||
def setClient(self, client):
|
def setClient(self, client):
|
||||||
@ -131,7 +132,7 @@ class MarvinPlugin(Plugin):
|
|||||||
|
|
||||||
def beforeTest(self, test):
|
def beforeTest(self, test):
|
||||||
testname = test.__str__().split()[0]
|
testname = test.__str__().split()[0]
|
||||||
self.testclient.identifier = '-'.join([self.testclient.identifier, testname])
|
self.testclient.identifier = '-'.join([self.identifier, testname])
|
||||||
|
|
||||||
def _injectClients(self, test):
|
def _injectClients(self, test):
|
||||||
testcaselogger = logging.getLogger("testclient.testcase.%s" %
|
testcaselogger = logging.getLogger("testclient.testcase.%s" %
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user