-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle SIGTERM as SIGINT for first attempt (#9734)
* Handle SIGTERM as SIGINT for first attempt In the Jenkins job, when it's aborted it's trying to SIGTERM with signal 15 which doesn't allow the pytest to finish gracefully. With changing it to SIGINT, the pytest should attempt to finalize the fixtures and clean up the resources gracefully. * Propagate [JOB ABORTED] to mail subject --------- Signed-off-by: Petr Balogh <[email protected]>
- Loading branch information
1 parent
0e1402e
commit 6de2737
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1753,7 +1753,11 @@ def email_reports(session): | |
[recipients.append(mailid) for mailid in mailids.split(",")] | ||
sender = "[email protected]" | ||
msg = MIMEMultipart("alternative") | ||
aborted_message = "" | ||
if config.RUN.get("aborted"): | ||
aborted_message = "[JOB ABORTED] " | ||
msg["Subject"] = ( | ||
f"{aborted_message}" | ||
f"ocs-ci results for {get_testrun_name()} " | ||
f"({build_str}" | ||
f"RUN ID: {config.RUN['run_id']}) " | ||
|