--- 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@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,
----- "Kamil Páral" kparal@redhat.com wrote:
tests/initscripts/initscripts.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
It just occurred to me that package maintainers could be also interested in results of this test, so I'm posting a patch...
----- "Kamil Paral" kparal@redhat.com wrote:
----- "Kamil Páral" kparal@redhat.com wrote:
tests/initscripts/initscripts.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
It just occurred to me that package maintainers could be also interested in results of this test, so I'm posting a patch...
Will, any concerns regarding this patch? May I commit it to the master?
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@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
----- "James Laska" jlaska@redhat.com wrote:
I wish we could move all this email stuff into a single location but that's well outside the scope of this patch.
Well, it's temporary anyway.
autoqa-devel@lists.fedorahosted.org