elif suite.tc_fail > 0 : # at least one failure suite.set_status("FAIL") elif suite.tc_fail == 0 : # no true failures, so we'll call the suite status PASS (there can be EXPECTED_TO_FAIL) suite.set_status("PASS") else : # don't know how we got here print("INTERNALERR: In an unexpected place when determining test suite status") suite.set_status("INDETERMINATE") # end if # update the test run counters test_run.tc_count = test_run.tc_count + suite.tc_count test_run.tc_pass = test_run.tc_pass + suite.tc_pass test_run.tc_fail = test_run.tc_fail + suite.tc_fail test_run.tc_expected_to_fail = test_run.tc_expected_to_fail + suite.tc_expected_to_fail test_run.tc_indeterminate = test_run.tc_indeterminate + suite.tc_indeterminate # if configured, update the DB if test_run.update_db : try : # update the test_run results sqlcmd = "UPDATE test_run \ SET tc_count = '%d', \ tc_pass = '******', \ tc_fail = '%d', \ tc_expected_to_fail = '%d', \ tc_skip = '%d', \ tc_indeterminate = '%d' \ WHERE id = %d" \
suite.set_status("FAIL") elif suite.tc_fail == 0: # no true failures, so we'll call the suite status PASS (there can be EXPECTED_TO_FAIL) suite.set_status("PASS") else: # don't know how we got here print( "INTERNALERR: In an unexpected place when determining test suite status" ) suite.set_status("INDETERMINATE") # end if # update the test run counters test_run.tc_count = test_run.tc_count + suite.tc_count test_run.tc_pass = test_run.tc_pass + suite.tc_pass test_run.tc_fail = test_run.tc_fail + suite.tc_fail test_run.tc_expected_to_fail = test_run.tc_expected_to_fail + suite.tc_expected_to_fail test_run.tc_indeterminate = test_run.tc_indeterminate + suite.tc_indeterminate # if configured, update the DB if test_run.update_db: try: # update the test_run results sqlcmd = "UPDATE test_run \ SET tc_count = '%d', \ tc_pass = '******', \ tc_fail = '%d', \ tc_expected_to_fail = '%d', \ tc_skip = '%d', \ tc_indeterminate = '%d' \ WHERE id = %d" \