-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #605 from achauphan/random-failure-tool-patch-2024…
…-02-15 CDash Random failure tool patch 2024-02-15 (#600)
- Loading branch information
Showing
2 changed files
with
15 additions
and
7 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 |
---|---|---|
|
@@ -32,6 +32,7 @@ def runDriver(self): | |
writeEmailToFile = self.args.write_email_to_file | ||
sendEmailFrom = self.args.send_email_from | ||
sendEmailTo = self.args.send_email_to | ||
emailSubjectPrefix = self.args.email_subject_prefix | ||
|
||
randomFailureSummaries = [] | ||
|
||
|
@@ -231,11 +232,12 @@ def runDriver(self): | |
cdashReportData.htmlEmailBodyTop += "\n</p>" | ||
|
||
defaultPageStyle = CDQAR.getDefaultHtmlPageStyleStr() | ||
subjectLine = emailSubjectPrefix+summaryLine | ||
|
||
if writeEmailToFile: | ||
print("\nWriting HTML to file: "+writeEmailToFile+" ...") | ||
htmlStr = CDQAR.getFullCDashHtmlReportPageStr(cdashReportData, | ||
pageTitle=summaryLine, pageStyle=defaultPageStyle) | ||
pageTitle=subjectLine, pageStyle=defaultPageStyle) | ||
# print(htmlStr) | ||
with open(writeEmailToFile, 'w') as outFile: | ||
outFile.write(htmlStr) | ||
|
@@ -247,7 +249,7 @@ def runDriver(self): | |
emailAddress = emailAddress.strip() | ||
print("\nSending email to '"+emailAddress+"' ...") | ||
msg=CDQAR.createHtmlMimeEmail( | ||
sendEmailFrom, emailAddress, summaryLine, "", htmlStr) | ||
sendEmailFrom, emailAddress, subjectLine, "", htmlStr) | ||
CDQAR.sendMineEmail(msg) | ||
|
||
def getCmndLineArgs(self): | ||
|
@@ -290,6 +292,9 @@ def getCmndLineArgs(self): | |
parser.add_argument("--send-email-from", default="[email protected]", | ||
help="Addressed sender of the script summary results email."+\ | ||
" [default='[email protected]']") | ||
parser.add_argument("--email-subject-prefix", default="", | ||
help="Prefix string added to the email subject line."+\ | ||
" [default='']") | ||
|
||
self.args = parser.parse_args() | ||
|
||
|
@@ -334,6 +339,6 @@ def singleSummaryReporter(self, cdashReportData): | |
cdashReportData.htmlEmailBodyTop += \ | ||
"\n<br>Build name: "+ self.buildName +\ | ||
"\n<br>Test name: "+ self.testName +\ | ||
"\n<br>Test history URL: "+ self.testHistoryUrl +\ | ||
"\n<br>Test history URL: <a href=\""+self.testHistoryUrl+"\">Link</a>" +\ | ||
"\n<br>Sha1 Pair : "+ str(self.sha1Pair) | ||
|