diff options
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI/onosfunctest.py')
-rw-r--r-- | testcases/Controllers/ONOS/Teston/CI/onosfunctest.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py index a47198b96..73b4b63ba 100644 --- a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py +++ b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py @@ -46,8 +46,10 @@ f.close() # onos parameters TEST_DB = functest_yaml.get("results").get("test_db_url") -ONOS_REPO_PATH = functest_yaml.get("general").get("directories").get("dir_repos") -ONOS_CONF_DIR = functest_yaml.get("general").get("directories").get("dir_functest_conf") +ONOS_REPO_PATH = functest_yaml.get("general").\ + get("directories").get("dir_repos") +ONOS_CONF_DIR = functest_yaml.get("general").\ + get("directories").get("dir_functest_conf") REPO_PATH = ONOS_REPO_PATH + '/functest/' if not os.path.exists(REPO_PATH): logger.error("Functest repository directory not found '%s'" % REPO_PATH) @@ -87,15 +89,15 @@ def GetResult(): LOGPATH = ONOSCI_PATH + "OnosSystemTest/TestON/logs" cmd = "grep -rnh " + "Fail" + " " + LOGPATH Resultbuffer = os.popen(cmd).read() - duration = datetime.datetime.now() - starttime + # duration = datetime.datetime.now() - starttime time.sleep(2) if re.search("\s+[1-9]+\s+", Resultbuffer): logger.debug("Testcase Fails\n" + Resultbuffer) - Result = "Failed" + # Result = "Failed" else: logger.debug("Testcases Success") - Result = "Success" + # Result = "Success" # payload={'timestart': str(starttime), # 'duration': str(duration), # 'status': Result} @@ -195,8 +197,9 @@ def main(): # i.e. FUNCvirNet & FUNCvirNetL3 status = "failed" try: - if result['FUNCvirNet']['result'] == "Success" and result['FUNCvirNetL3']['result'] == "Success": - status = "passed" + if (result['FUNCvirNet']['result'] == "Success" and + result['FUNCvirNetL3']['result'] == "Success"): + status = "passed" except: logger.error("Unable to set ONOS criteria") |