From c0d8b9e334021f398cbb0dfb5c2aca86b7717bea Mon Sep 17 00:00:00 2001 From: Santhosh Edukulla Date: Fri, 14 Feb 2014 10:45:14 +0530 Subject: [PATCH] CLOUDSTACK-5674: getZoneForTests should return None if zone is "NA" in test_data.py --- tools/marvin/marvin/cloudstackTestClient.py | 6 ++++-- tools/marvin/marvin/config/test_data.py | 1 - tools/marvin/marvin/marvinPlugin.py | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 4d05eafe0bb..adb7ce365cc 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -96,8 +96,10 @@ class CSTestClient(object): @Output : Returns the Zone Name ''' if self.__zone is None: - if self.__parsedTestDataConfig is not None: - self.__zone = self.__parsedTestDataConfig.get("zone") + if self.__parsedTestDataConfig: + ret = self.__parsedTestDataConfig.get("zone") + if ret != "NA": + self.__zone = ret return self.__zone def __setHypervisorToClient(self): diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index 788af227dbe..9f5770d421f 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -5,7 +5,6 @@ test_data = { "regionendpoint": "http://region2:8080/client" }, "zone": "NA", - "domain": { "name": "domain" }, "project": { diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index 3a9740432c6..e6986cc0277 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -227,6 +227,8 @@ class MarvinPlugin(Plugin): def __runSuites(self, suites): for suite in suites: + if os.path.isdir(suite): + return self.__runSuites(suite) self.__runSuite(suite) def startMarvin(self): @@ -240,14 +242,17 @@ class MarvinPlugin(Plugin): ''' try: if self.__deployDcFlag: - print "\nStep1 :Deploy Flag is Enabled, will deployDC" + print "\n***Step1 :Deploy Flag is Enabled, will deployDC****" obj_marvininit = MarvinInit(self.__configFile, self.__deployDcFlag, "DeployDc", self.__zoneForTests) if not obj_marvininit or obj_marvininit.init() != SUCCESS: return FAILED - print "\nStep2: Now Start Running Test Suites" + print "\n*******Now Start Running Test Suites***" + if len(self.conf.testNames) == 0: + print "\n*** No Test Suites are provided, please check**" + return FAILED for suites in self.conf.testNames: if os.path.isdir(suites): self.__runSuites(suites)