Updated Branches: refs/heads/master d893cb48a -> 2d55914e7
CLOUDSTACK-3075: append module/suite name If the test doesn't create the account within the testXxx method we miss the trail of the accountname because the setUpClass() created the account. Append the module name in advance in such cases to identify the account that was created in the suite before any tests were executed. Signed-off-by: Prasanna Santhanam <[email protected]> (cherry picked from commit 6a8608a916eec2551797e93634d9716e9d15c783) Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2d55914e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2d55914e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2d55914e Branch: refs/heads/master Commit: 2d55914e70dd7589e9cb2c3e105c4d91369a08b5 Parents: d893cb4 Author: Prasanna Santhanam <[email protected]> Authored: Mon Jul 22 12:15:12 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Mon Jul 22 12:19:03 2013 +0530 ---------------------------------------------------------------------- tools/marvin/marvin/marvinPlugin.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d55914e/tools/marvin/marvin/marvinPlugin.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index a0ec3d5..19930d4 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -110,12 +110,16 @@ class MarvinPlugin(Plugin): return self.testrunner def wantClass(self, cls): + if cls.__name__ == 'cloudstackTestCase': + return False if issubclass(cls, cloudstackTestCase): return True return None def loadTestsFromTestCase(self, cls): - self._injectClients(cls) + if cls.__name__ != 'cloudstackTestCase': + self.testclient.identifier = cls.__name__ + self._injectClients(cls) def setClient(self, client): if client is not None: @@ -126,11 +130,14 @@ class MarvinPlugin(Plugin): self.config = config def beforeTest(self, test): - self.testclient.identifier = test.__str__().split()[0] + testname = test.__str__().split()[0] + self.testclient.identifier = '-'.join([self.testclient.identifier, testname]) def _injectClients(self, test): testcaselogger = logging.getLogger("testclient.testcase.%s" % test.__name__) + + self.debug_stream. \ setFormatter(logging. Formatter("%(asctime)s - %(levelname)s - %(name)s" +
