On Fri, 2010-05-14 at 09:48 +0200, Kamil Páral wrote:
---
tests/initscripts/initscripts.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/tests/initscripts/initscripts.py b/tests/initscripts/initscripts.py
index 634a04d..630c944 100644
--- a/tests/initscripts/initscripts.py
+++ b/tests/initscripts/initscripts.py
@@ -27,6 +27,7 @@ import koji
from autotest_lib.client.bin import test, utils
from autotest_lib.client.bin.test_config import config_loader
from autotest_lib.client.common_lib import error
+from autoqa.repoinfo import repoinfo
class initscripts(test.test):
version = 1 # increment if setup() changes
@@ -151,11 +152,17 @@ class initscripts(test.test):
mail_from = self.config.get('test', 'mail_from')
mail_server = self.config.get('test', 'smtpserver')
if (mail_to and mail_from and mail_server):
+ mail_to = mail_to.split(',')
+ collection_name =
repoinfo.getrepo_by_tag(kojitag)['collection_name']
+ if collection_name and autoqa.util.check_opt_in(name, collection_name):
+ #FIXME - hardcoded partial email address here - obviously sub-par
+ mail_to.append('%s-owner(a)fedoraproject.org' % name)
+
msg = "Following tests returned zero exit code: %s\n" %
repr(tests_exit_status_zero)
msg += "Following tests returned NON-zero exit code: %s\n" %
repr(tests_exit_status_nonzero)
msg += "%s\n" % ("#" * 79,)
- print "Sending email with results to '%s' ..." % mail_to
+ print 'Sending email with results to %s ...' % ',
'.join(mail_to)
utils.send_email(mail_to = mail_to,
mail_from = mail_from,
mail_server = mail_server,
Looks good to me. Seems consistent with the other changes for sending
mail to maintainers.
I wish we could move all this email stuff into a single location but
that's well outside the scope of this patch.
Thanks,
James