diff options
author | MofassirArif <Mofassir_Arif@dellteam.com> | 2016-01-12 03:12:23 -0800 |
---|---|---|
committer | Nauman Ahad <Nauman_Ahad@dell.com> | 2016-01-14 11:58:11 +0000 |
commit | 63fa71cc462c00f19bc1949f3e2b32f42721388b (patch) | |
tree | e7fa95e0b05564d5f3ee2e14a516e8410083a9d6 /dashboard | |
parent | c02ac0ea76af8011afaf7241e30999326efe8105 (diff) |
error handling for the files being input to the framework.
iperf bug fix for the bare metal testing, renamed all the iperf
config files. added more detail to the help.
Change-Id: I16cfb1c05599cd0b803e735e6a75083e3e6733ec
Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com>
(cherry picked from commit 4c06a4ed3b3b22e3dbcddb33dda33ca773dfae11)
Diffstat (limited to 'dashboard')
-rw-r--r-- | dashboard/pushtoDB.py | 21 | ||||
-rw-r--r-- | dashboard/qtip2dashboard.py | 2 |
2 files changed, 12 insertions, 11 deletions
diff --git a/dashboard/pushtoDB.py b/dashboard/pushtoDB.py index e9e05ba2..b889f21c 100644 --- a/dashboard/pushtoDB.py +++ b/dashboard/pushtoDB.py @@ -4,8 +4,8 @@ import datetime import os
TEST_DB = 'http://213.77.62.197'
-suite_list = ['compute_result.json','network_result.json','storage_result.json']
-payload_list = []
+suite_list = [('compute_result.json', 'compute_test_suite'),('network_result.json', 'network_test_suite'),('storage_result.json', 'storage_test_suite')]
+payload_list = { }
def push_results_to_db(db_url, case_name, payload,logger=None, pod_name="dell-us-testing-1"):
@@ -24,7 +24,7 @@ def push_results_to_db(db_url, case_name, payload,logger=None, pod_name="dell-us headers = {'Content-Type': 'application/json'}
print params
- '''
+
try:
r = requests.post(url, data=json.dumps(params), headers=headers)
print r
@@ -32,13 +32,14 @@ def push_results_to_db(db_url, case_name, payload,logger=None, pod_name="dell-us except:
print "Error:", sys.exc_info()[0]
return False
- '''
+
def populate_payload(suite_list):
global payload_list
- for suites in suite_list:
- if os.path.isfile('results/'+suites):
- payload_list.append(suites)
+ for k,v in suite_list:
+ print 'results/'+k
+ if os.path.isfile('results/'+str(k)):
+ payload_list[k]=v
print payload_list
@@ -46,11 +47,11 @@ def main(): global payload_list
populate_payload(suite_list)
- for pay in payload_list:
- with open('results/'+pay,'r') as result_file:
+ for suite,case in payload_list.items():
+ with open('results/'+suite,'r') as result_file:
j=result_file.read().rstrip()
push_results_to_db(TEST_DB, 'Compute benchmark suite',j)
if __name__ == "__main__":
- main()
\ No newline at end of file + main()
diff --git a/dashboard/qtip2dashboard.py b/dashboard/qtip2dashboard.py index 008f7371..3eab96cc 100644 --- a/dashboard/qtip2dashboard.py +++ b/dashboard/qtip2dashboard.py @@ -9,7 +9,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - +asfdasd def get_qtip_cases(): """ get the list of the supported test cases |