CLOUDSTACK-3049: marvin-nose causes other plugins to fail when not enabled enabled by default. Running regular nosetests with plugins other than marvin will fail because of this. Failure manifests itself as nose looking for the config file when using the marivn-nose plugin
Signed-off-by: Prasanna Santhanam <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/746af2bb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/746af2bb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/746af2bb Branch: refs/heads/object_store Commit: 746af2bb6f5d356a0ea3fd274d192e2eb9bb83a0 Parents: 97eb35c Author: Prasanna Santhanam <[email protected]> Authored: Tue Jun 18 15:06:46 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Tue Jun 18 15:20:58 2013 +0530 ---------------------------------------------------------------------- tools/marvin/marvin/marvinPlugin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/746af2bb/tools/marvin/marvin/marvinPlugin.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index 46a8a4f..846f735 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -34,9 +34,15 @@ class MarvinPlugin(Plugin): """ name = "marvin" + def configure(self, options, config): - self.enabled = 1 - self.enableOpt = "--with-marvin" + 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") if options.debug_log:
