Changeset 86936 in vbox for trunk/src/VBox/ValidationKit/testmanager
- Timestamp:
- Nov 20, 2020 3:14:02 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 141441
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/cgi/status.py
r86935 r86936 113 113 testboxes_dict = dict_update(testboxes_dict, testbox_name, test_result) 114 114 115 if "testbox_os" not in testboxes_dict[testbox_name] .keys(): ## bird: you don't need to use keys() here.115 if "testbox_os" not in testboxes_dict[testbox_name]: 116 116 testboxes_dict[testbox_name].update({"testbox_os": test_box_os}) 117 117 118 if "sched_group" not in testboxes_dict[testbox_name] .keys():118 if "sched_group" not in testboxes_dict[testbox_name]: 119 119 testboxes_dict[testbox_name].update({"sched_group": test_sched_group}) 120 120 elif test_sched_group not in testboxes_dict[testbox_name]["sched_group"]: 121 testboxes_dict[testbox_name]["sched_group"] = testboxes_dict[testbox_name]["sched_group"] + ","+ test_sched_group121 testboxes_dict[testbox_name]["sched_group"] += "," + test_sched_group 122 122 123 123 if test_result == "running": 124 124 testboxes_dict[testbox_name].update({"hours_running": find_test_duration(test_created)}) 125 125 126 #earlier: clean_file_and_insert_data(testboxes_dict, target_file)127 126 return testboxes_dict; 128 127 … … 137 136 elif testbox_os == "solaris": 138 137 dict_update(vb_dict, test_name + " / solaris", test_result) 139 else: 140 dict_update(vb_dict, test_name + " / other", test_result) 141 138 # else: 139 # dict_update(vb_dict, test_name + " / other", test_result) 140 141 142 # const/immutable. 143 g_kdTestStatuses = { 144 'running': 0, 145 'success': 0, 146 'skipped': 0, 147 'bad-testbox': 0, 148 'aborted': 0, 149 'failure': 0, 150 'timed-out': 0, 151 'rebooted': 0, 152 } 142 153 143 154 def dict_update(target_dict, key_name, test_result): 144 def test_statuses_dict_default(): 145 test_statuses_dict = { 146 'running': 0, 147 'success': 0, 148 'skipped': 0, 149 'bad-testbox': 0, 150 'aborted': 0, 151 'failure': 0, 152 'timed-out': 0, 153 'rebooted': 0, 154 } 155 return test_statuses_dict 156 if key_name not in target_dict.keys(): 157 target_dict.update({key_name: test_statuses_dict_default().copy()}) 158 if test_result in test_statuses_dict_default().keys(): 155 if key_name not in target_dict: 156 target_dict.update({key_name: g_kdTestStatuses.copy()}) 157 if test_result in g_kdTestStatuses: 159 158 target_dict[key_name][test_result] += 1 160 159 return target_dict
Note:
See TracChangeset
for help on using the changeset viewer.