aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-06-09 11:26:22 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-06-09 11:30:10 +0200
commitb049ac7ad61134b4a405505db5e041fd6bdb8a5c (patch)
treede0aa6471346b8d55aeee293b5220d8b8696f205
parent44a8c38dd0e2be4cb3996bba7f89d29a426a6694 (diff)
Fix vPing success criteria evaluation bugfix
Switching back to the odl approach. Need more discussions to see how to evaluate the result from testcases.yaml Change-Id: Iaa866db3010d35bd2cc427190dfe64db6b732a93 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-rw-r--r--testcases/OpenStack/vPing/vPing_ssh.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/testcases/OpenStack/vPing/vPing_ssh.py b/testcases/OpenStack/vPing/vPing_ssh.py
index 2a417eb3..3f90bc21 100644
--- a/testcases/OpenStack/vPing/vPing_ssh.py
+++ b/testcases/OpenStack/vPing/vPing_ssh.py
@@ -391,6 +391,7 @@ def main():
cmd = '~/ping.sh ' + test_ip
flag = False
+ status = "FAIL"
while True:
time.sleep(1)
@@ -400,7 +401,7 @@ def main():
for line in output:
if "vPing OK" in line:
logger.info("vPing detected!")
-
+ status = "PASS"
# we consider start time at VM1 booting
stop_time = time.time()
duration = round(stop_time - start_time, 1)
@@ -418,12 +419,8 @@ def main():
logger.debug("Pinging %s. Waiting for response..." % test_ip)
sec += 1
- test_status = "FAIL"
- test_criteria = functest_utils.get_criteria_by_test("vping_ssh")
-
- if eval(test_criteria):
+ if status == "PASS":
logger.info("vPing OK")
- test_status = "PASS"
else:
duration = 0
logger.error("vPing FAILED")
@@ -436,10 +433,10 @@ def main():
logger,
start_time,
stop_time,
- test_status,
+ status,
details={'timestart': start_time,
'duration': duration,
- 'status': test_status})
+ 'status': status})
except:
logger.error("Error pushing results into Database '%s'"
% sys.exc_info()[0])
#008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Master makefile definitions for project opnfv vswitchperf
#
# Copyright (C) 2015 OPNFV
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without warranty of any kind.
#
# Contributors:
#   Aihua Li, Huawei Technologies.

# user has the full control to decide where to put the build by
# specifying INSTALL_DIR from the make input

# try to read it in from environment
INSTALL_DIR ?= $(shell echo $$INSTALL_DIR)

# if it is still not set, then set it to default
ifeq ($(INSTALL_DIR),)
INSTALL_DIR = /opt/opnfv
endif

# for debugging Makefile
# Make V as a synonum for VERBOSE
ifdef V
VERBOSE = $(V)
endif

VERBOSE ?= 0

ifeq ($(VERBOSE),0)
    AT = @
else
    BASH_X = -x
endif

.DEFAULT_GOAL := all

.PHONY: all clean cleanse clobber