summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-04-20 16:03:44 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-04-21 00:01:59 +0200
commitef62824e0471d07a4a3a40c401fc433070d961c6 (patch)
tree6d1bd61e7d49446ba1b1a52bb9978e1c5b88173c /testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
parent3a85a34474a9d7a9384f22bce35e7b81177830e3 (diff)
Fix Flake8 Violations in the Functest scripts
JIRA: FUNCTEST-213 Change-Id: I66c02dd6ff12ffb9798ebe44a4cfe7bfc73e76c3 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI/onosfunctest.py')
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/onosfunctest.py17
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")