summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorliyin <liyin11@huawei.com>2016-12-02 15:41:21 +0800
committerliyin <liyin11@huawei.com>2016-12-02 15:41:21 +0800
commitc8df867b2a9630399ce3f08aef1794283b15bd13 (patch)
treec964dfb8d796b0552f185c32bf99bf394e6d2b4b /testsuites
parent53f5312b50d1e7eb5f65f827e6f7d6737e4d6348 (diff)
add more debug info
JIRA: BOTTLENECK-115 This patch add some debug info to screen. so test situation will be displayed to every one. And it's could be easier to understand Change-Id: Iecf767eedf42825a13dae59235ab99d1767e744e Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/posca/testcase_script/common_script.py11
-rw-r--r--testsuites/posca/testcase_script/posca_factor_system_bandwidth.py5
2 files changed, 9 insertions, 7 deletions
diff --git a/testsuites/posca/testcase_script/common_script.py b/testsuites/posca/testcase_script/common_script.py
index 476968a5..2ca9f68b 100644
--- a/testsuites/posca/testcase_script/common_script.py
+++ b/testsuites/posca/testcase_script/common_script.py
@@ -35,7 +35,7 @@ def posca_tran_data(ES_ip, file_name):
def posca_config_read(config_str, con_str, config):
print("========== posca system bandwidth config read ===========")
con_dic = {}
- print(config_str)
+ print("Configuration file is %s" %(config_str))
idx = 0
with open(config_str, "rd") as cfgfile:
config.readfp(cfgfile)
@@ -81,7 +81,7 @@ def posca_get_reply(con_dic, task_id, time_test=1):
time.sleep(float(con_dic["test_time"]))
reply_response = requests.get(reply_url)
reply_data = json.loads(reply_response.text)
- print(reply_data)
+ print("return data is %s" %(reply_data))
if reply_data["status"] == 1:
return(reply_data["result"][0])
if reply_data["status"] == 0:
@@ -98,7 +98,7 @@ def posca_get_reply(con_dic, task_id, time_test=1):
def posca_send_data(con_dic, test_config, file_config):
base_url = "http://%s/yardstick/testcases/samples/action" % (con_dic['test_ip'])
- print(con_dic["test_ip"])
+ print("test ip addr is %s" %(base_url))
test_dict = {
"action":"runTestCase",
"args":{
@@ -118,7 +118,7 @@ def posca_send_data(con_dic, test_config, file_config):
base_url, data=json.dumps(test_dict), headers=headers)
ask_data = json.loads(reponse.text)
task_id = ask_data["result"]
- print(task_id)
+ print("yardstick task id is: %s" %(task_id))
data_reply = posca_get_reply(con_dic, task_id)
data_reply.update(test_config)
posca_output_result(file_config, data_reply)
@@ -132,4 +132,7 @@ def posca_create_incluxdb(con_dic):
}
reponse = requests.post(
base_url, data=json.dumps(test_dict), headers=headers)
+ print("waiting for creating InfluxDB")
+ time.sleep(30)
+ print("Done, creating InflxDB Container")
diff --git a/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py b/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py
index f6e66f42..0eb88814 100644
--- a/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py
+++ b/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py
@@ -48,7 +48,7 @@ def posca_env_check():
def system_pkt_bandwidth(test_id, data, file_config, con_dic):
date_id = test_id
- print("package test is is begin from %d" % test_id)
+ print("test is is begin from %d" % test_id)
cur_role_result = 1
pre_role_result = 1
pre_reply = {}
@@ -125,12 +125,11 @@ def main():
'tx_pkt_sizes', 'rx_pkt_sizes', 'cpu_load',
'latency', 'ES_ip', 'dashboard'
]
+ posca_env_check()
starttime = datetime.datetime.now()
config = ConfigParser.ConfigParser()
con_dic = common_script.posca_config_read(testcase_cfg, con_str, config)
common_script.posca_create_incluxdb(con_dic)
- time.sleep(30)
- posca_env_check()
posca_run(con_dic)
endtime = datetime.datetime.now()
if con_dic["dashboard"] == "y":