Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more test suites for replay pipeline, code cleanup #114

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
reporting failed test execution in replay pipeline
TheAmg committed Aug 9, 2024
commit d500619f7579abad3e66a3218a8d34eed21a5cae
1 change: 1 addition & 0 deletions src/test/python/Target.py
Original file line number Diff line number Diff line change
@@ -255,6 +255,7 @@ def check_replay(self):
result_map['passing'] = str(total-len(replay_fail))
result_map['case_result'] = test_case_results

result_map['run_state'] = True
return result_map

def format_report_name(self,repo_name):
6 changes: 6 additions & 0 deletions src/test/python/markup_report_generator.py
Original file line number Diff line number Diff line change
@@ -42,11 +42,16 @@ def generate_and_write_report(self):
total = summary['tot']
passing_count = summary['passing']
case_results = summary['case_result']
run_state = summary['run_state']

report_content += "*Java version* : "+java_version+"\n\n"
report_content += "*Passing Count* : "+passing_count+"/"+total+"\n\n"
report_content += "*Status* : "+self.get_status_string(status)+"\n\n"

if run_state == False:
report_content += "*Test Execution Failed : No tests were run for this project*\n\n"
continue

report_content += "| Test ID | Status |\n"
report_content += "|---------|--------|\n"

@@ -76,6 +81,7 @@ def add_replay_result_status_entry(self, target, result_map):

new_entry = dict()
new_entry['java_version'] = target.target_run_properties.java_version
new_entry['run_state'] = result_map['run_state']
new_entry['status'] = result_map['status']
new_entry['tot'] = result_map['tot']
new_entry['passing'] = result_map['passing']
10 changes: 9 additions & 1 deletion src/test/python/replay_target.py
Original file line number Diff line number Diff line change
@@ -48,7 +48,15 @@ def replay_target(target):
if (response_code == 0):
print("Test for target executed successfully: " + target.test_repo_name)
else:
raise Exception("Test for target failed execution: " + target.test_repo_name)
print("Test for target failed execution: " + target.test_repo_name)
result_map = dict()
result_map['java_version'] = target.target_run_properties.java_version
result_map['status'] = TestResult.FAIL
result_map['tot'] = "0"
result_map['passing'] = "0"
result_map['case_result'] = []
result_map['run_state'] = False
return result_map

# assert and clean repo
result_map = target.check_replay()