mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-10 23:12:41 +08:00
update with jenkins-mail-py 0.2.2
This commit is contained in:
@@ -50,7 +50,7 @@ def main():
|
|||||||
report name is ignored, use generated time instead.")
|
report name is ignored, use generated time instead.")
|
||||||
|
|
||||||
results = {}
|
results = {}
|
||||||
flag = "SUCCESS"
|
subject = "SUCCESS"
|
||||||
|
|
||||||
for testset_path in set(args.testset_paths):
|
for testset_path in set(args.testset_paths):
|
||||||
|
|
||||||
@@ -73,9 +73,10 @@ def main():
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(result.successes) != result.testsRun:
|
if len(result.successes) != result.testsRun:
|
||||||
flag = "FAILED"
|
subject = "FAILED"
|
||||||
|
|
||||||
|
flag_code = 0 if subject == "SUCCESS" else 1
|
||||||
if mailer and mailer.config_ready:
|
if mailer and mailer.config_ready:
|
||||||
mailer.send_mail(flag, content=results)
|
mailer.send_mail(subject, results, flag_code)
|
||||||
|
|
||||||
return 0 if flag == "SUCCESS" else 1
|
return flag_code
|
||||||
|
|||||||
Reference in New Issue
Block a user