diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-01-30 19:53:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-01-30 19:53:53 +0000 |
commit | 791b42ecb947f65f897d218ab715494f4fa06437 (patch) | |
tree | 2b436d7efc055046171e4701f44cb842c013de5f /testcases/Controllers/ONOS/Teston/CI | |
parent | aa02e0de645a6af39baed4abed3667a112b09c42 (diff) | |
parent | 38cb5f334a2acc034b9757eba68561d134da79fa (diff) |
Merge "fix the bug of onos test report"
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI')
-rw-r--r-- | testcases/Controllers/ONOS/Teston/CI/onosfunctest.py | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py index eb2c7936c..2d22baec9 100644 --- a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py +++ b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py @@ -93,9 +93,29 @@ def GetResult(): else: logger.debug("Testcases Success") Result = "Success" - payload={'timestart': str(starttime), - 'duration': str(duration), - 'status': Result} + #payload={'timestart': str(starttime), + # 'duration': str(duration), + # 'status': Result} + cmd = "grep -rnh 'Execution Time' " + LOGPATH + Resultbuffer = os.popen(cmd).read() + time1 = Resultbuffer[114:128] + time2 = Resultbuffer[28:42] + cmd = "grep -rnh 'Success Percentage' " + LOGPATH + "/FUNCvirNetNB_*" + Resultbuffer = os.popen(cmd).read() + if Resultbuffer.find('100%') >= 0: + result1='Success' + else: + result1='Failed' + cmd = "grep -rnh 'Success Percentage' " + LOGPATH + "/FUNCvirNetNBL3*" + Resultbuffer = os.popen(cmd).read() + if Resultbuffer.find('100%') >= 0: + result2='Success' + else: + result2='Failed' + payload={'FUNCvirNet':{'duration': time1, + 'result': result1}, + 'FUNCvirNetL3':{'duration': time2, + 'result': result2}} return payload def SetOnosIp(): |