Skip to content

Commit a7c7e10

Browse files
committed
Updates to clean up
1 parent b119c67 commit a7c7e10

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/main/resources/scripts/cobertura.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ def getFileXML(testXml, coverAPI, verbose = False, extended = False, source_root
154154
file.attrib['branch-rate'] = str(branch_pct)
155155
if coverAPI.metrics.function_calls > 0:
156156
funcCallPercentStr = "{:.2f}% ( {} / {} )".format(
157-
func.metrics.max_covered_function_calls_pct,
158-
func.metrics.max_covered_function_calls + func.metrics.max_annotations_function_calls,
159-
func.metrics.function_calls
157+
coverAPI.metrics.max_covered_function_calls_pct,
158+
coverAPI.metrics.max_covered_function_calls + coverAPI.metrics.max_annotations_function_calls,
159+
coverAPI.metrics.function_calls
160160
)
161161
method.attrib['functioncall-coverage'] = funcCallPercentStr
162162
file.attrib['functioncall-coverage'] = funcCallPercentStr
163163
if coverAPI.metrics.mcdc_pairs > 0:
164164
mcdcPairPercentStr = "{:.2f}% ( {} / {} )".format(
165-
func.metrics.max_covered_mcdc_pairs_pct,
166-
func.metrics.max_covered_mcdc_pairs + func.metrics.max_annotations_mcdc_pairs,
167-
func.metrics.mcdc_pairs
165+
coverAPI.metrics.max_covered_mcdc_pairs_pct,
166+
coverAPI.metrics.max_covered_mcdc_pairs + coverAPI.metrics.max_annotations_mcdc_pairs,
167+
coverAPI.metrics.mcdc_pairs
168168
)
169169
file.attrib['mcdcpair-coverage'] = mcdcPairPercentStr
170170

src/main/resources/scripts/generate_qa_results_xml.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,19 @@ def genQATestResults(mp, level = None, envName = None, verbose = False, encoding
213213

214214
report_name = os.path.basename(mp)[:-4] + "_system_tests_status.txt"
215215

216+
print("[DEBUG] Processing " + report_name)
217+
216218
if os.path.exists(report_name):
219+
print("[DEBUG] " + report_name + " exists")
217220
with open(report_name,"rb") as fd:
218221
raw = fd.read()
219222
out = raw.decode(encoding, 'replace')
220223

221224
passed_count, failed_count = processSystemTestResultsData(out.splitlines(), encoding)
222225

226+
else:
227+
print("[DEBUG] " + report_name + " missing")
228+
223229
return passed_count, failed_count
224230

225231
if __name__ == '__main__':

0 commit comments

Comments
 (0)