Current test were updated, so the all send the URL to the stored
results on the Autotest server (on first line of the email).
---
tests/conflicts/conflicts.py | 9 +++++++--
tests/conflicts/control | 3 ++-
tests/initscripts/control | 3 ++-
tests/initscripts/initscripts.py | 9 ++++++---
tests/rats_install/control | 3 ++-
tests/rats_install/rats_install.py | 9 +++++++--
tests/rats_sanity/control | 3 ++-
tests/rats_sanity/rats_sanity.py | 9 +++++++--
tests/repoclosure/control | 3 ++-
tests/repoclosure/repoclosure.py | 9 +++++++--
tests/rpmguard/control | 3 ++-
tests/rpmguard/rpmguard.py | 9 +++++++--
tests/rpmlint/control | 3 ++-
tests/rpmlint/rpmlint.py | 9 +++++++--
14 files changed, 62 insertions(+), 22 deletions(-)
diff --git a/tests/conflicts/conflicts.py b/tests/conflicts/conflicts.py
index 16f8644..9b08b1b 100644
--- a/tests/conflicts/conflicts.py
+++ b/tests/conflicts/conflicts.py
@@ -33,7 +33,11 @@ class conflicts(test.test):
f.write(logdata)
f.close()
- def run_once(self, baseurl, parents, reponame):
+ def run_once(self, baseurl, parents, reponame, autotest_url):
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
+
os.chdir(self.bindir)
cmd = './potential_conflict.py --tempcache --newest'
cmd += ' --repofrompath=target,%s --repoid=target' % baseurl
@@ -65,10 +69,11 @@ class conflicts(test.test):
result_email = self.config.get('test','result_email')
if result_email:
+ mail_body = "Full logs available at <%s>\n\n%s" %
(results_url, out)
utils.send_email(mail_to=result_email,
mail_from=self.config.get('test','mail_from'),
mail_server=self.config.get('test','smtpserver'),
subject='conflicts: %u packages with file
conflicts in %s' % (len(conflicting_pkgs), reponame),
- body = out)
+ body = mail_body)
# TODO fail test if file conflicts exist?
diff --git a/tests/conflicts/control b/tests/conflicts/control
index 7c9b780..495f19a 100644
--- a/tests/conflicts/control
+++ b/tests/conflicts/control
@@ -13,4 +13,5 @@ TEST_CATEGORY = 'Functional'
job.run_test('conflicts', baseurl=url,
parents=parents,
reponame=reponame,
- config=autoqa_conf)
+ config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/initscripts/control b/tests/initscripts/control
index fec4fc0..3b9d317 100644
--- a/tests/initscripts/control
+++ b/tests/initscripts/control
@@ -14,4 +14,5 @@ TEST_CATEGORY = 'Functional'
# name: package name
# kojitag: koji tag applied to this package
-job.run_test('initscripts', name=name, envr=envr, kojitag=kojitag,
config=autoqa_conf)
+job.run_test('initscripts', name=name, envr=envr, kojitag=kojitag,
config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/initscripts/initscripts.py
b/tests/initscripts/initscripts.py
index 634a04d..1da8a36 100644
--- a/tests/initscripts/initscripts.py
+++ b/tests/initscripts/initscripts.py
@@ -93,11 +93,13 @@ class initscripts(test.test):
- def run_once(self, envr, name, kojitag):
+ def run_once(self, envr, name, kojitag, autotest_url):
"""
name - name of the package for initscript test
"""
-
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
#find all tests for package $name
testdir = os.path.join(self.bindir, "./tests/%s" % name)
tests = []
@@ -151,7 +153,8 @@ 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):
- msg = "Following tests returned zero exit code: %s\n" %
repr(tests_exit_status_zero)
+ msg = "Full logs available at <%s>\n\n" % results_url
+ 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,)
diff --git a/tests/rats_install/control b/tests/rats_install/control
index f3fd56e..2cff980 100644
--- a/tests/rats_install/control
+++ b/tests/rats_install/control
@@ -16,4 +16,5 @@ TEST_CLASS = 'General'
TEST_CATEGORY = 'Functional'
TEST_TYPE = 'CLIENT'
-job.run_test('rats_install', baseurl=url, treename=treename,
config=autoqa_conf)
+job.run_test('rats_install', baseurl=url, treename=treename,
config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/rats_install/rats_install.py
b/tests/rats_install/rats_install.py
index 3a46606..d657e34 100644
--- a/tests/rats_install/rats_install.py
+++ b/tests/rats_install/rats_install.py
@@ -47,7 +47,11 @@ class rats_install(test.test):
# use the big hammer until we figure out the right thing
to do
utils.system('lokkit --disabled')
- def run_once(self, baseurl, treename, image_url="", boot_args=""):
+ def run_once(self, baseurl, treename, autotest_url, image_url="",
boot_args=""):
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
+
os.chdir(self.bindir)
cmd = "./install.py -s %s -l %s" % (self.tmpdir, self.resultsdir)
if image_url != "":
@@ -64,11 +68,12 @@ class rats_install(test.test):
result_email = self.config.get('test','result_email')
if result_email:
+ mail_body = "Full logs available at <%s>\n\n%s" %
(results_url, out)
utils.send_email(mail_to=result_email,
mail_from=self.config.get('test','mail_from'),
mail_server=self.config.get('test','smtpserver'),
subject='rats_install %s %s' % (result,
treename),
- body = out)
+ body = mail_body)
# grab extra key = val data
keyvals = util.read_keyvals()
diff --git a/tests/rats_sanity/control b/tests/rats_sanity/control
index 299d423..784998c 100644
--- a/tests/rats_sanity/control
+++ b/tests/rats_sanity/control
@@ -20,4 +20,5 @@ TEST_TYPE = 'CLIENT'
job.run_test('rats_sanity', baseurl=url,
parents=parents,
reponame=reponame,
- config=autoqa_conf)
+ config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/rats_sanity/rats_sanity.py
b/tests/rats_sanity/rats_sanity.py
index 3e1f7fb..b13bcca 100644
--- a/tests/rats_sanity/rats_sanity.py
+++ b/tests/rats_sanity/rats_sanity.py
@@ -34,7 +34,11 @@ class rats_sanity(test.test):
if os.path.exists(self.irb_conf):
utils.system('yum -y install python-fedora')
- def run_once(self, baseurl, parents, reponame):
+ def run_once(self, baseurl, parents, reponame, autotest_url):
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
+
os.chdir(self.bindir)
cmd = "./sanity.py -s %s -l %s" % (self.tmpdir, self.resultsdir)
cmd += " %s" % baseurl
@@ -47,11 +51,12 @@ class rats_sanity(test.test):
result_email = self.config.get('test','result_email')
if result_email:
+ mail_body = "Full logs available at <%s>\n\n%s" %
(results_url, out)
utils.send_email(mail_to=result_email,
mail_from=self.config.get('test','mail_from'),
mail_server=self.config.get('test','smtpserver'),
subject='rats_sanity %s %s' % (result,
reponame),
- body = out)
+ body = mail_body)
# grab extra key = val data
keyvals = util.read_keyvals()
diff --git a/tests/repoclosure/control b/tests/repoclosure/control
index 8467545..9a4e187 100644
--- a/tests/repoclosure/control
+++ b/tests/repoclosure/control
@@ -12,4 +12,5 @@ TEST_CATEGORY = 'Functional'
job.run_test('repoclosure', baseurl=url, parents=parents,
reponame=reponame,
- config=autoqa_conf)
+ config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/repoclosure/repoclosure.py
b/tests/repoclosure/repoclosure.py
index 29b0106..4a96d58 100644
--- a/tests/repoclosure/repoclosure.py
+++ b/tests/repoclosure/repoclosure.py
@@ -30,7 +30,11 @@ class repoclosure(test.test):
def setup(self):
utils.system('yum -y install yum-utils')
- def run_once(self, baseurl, parents='', reponame=''):
+ def run_once(self, baseurl, autotest_url, parents='', reponame=''):
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
+
# build the repoclosure commandline
cmd = 'repoclosure --tempcache --newest'
cmd += ' --repofrompath=target,%s --repoid=target' % baseurl
@@ -47,11 +51,12 @@ class repoclosure(test.test):
result_email = self.config.get('test','result_email')
if result_email:
+ mail_body = "Full logs available at <%s>\n\n%s" %
(results_url, out)
utils.send_email(mail_to=result_email,
mail_from=self.config.get('test','mail_from'),
mail_server=self.config.get('test','smtpserver'),
subject='repoclosure: %u packages with
unresolved deps in %s' % (unresolved_count, reponame),
- body = out)
+ body = mail_body)
if unresolved_count:
raise error.TestFail, "%u packages with unresolved deps" %
unresolved_count
diff --git a/tests/rpmguard/control b/tests/rpmguard/control
index 8c6bd12..cb0decb 100644
--- a/tests/rpmguard/control
+++ b/tests/rpmguard/control
@@ -18,4 +18,5 @@ TEST_CATEGORY = 'Regression'
# kojitag: koji tag applied to this package
job.run_test('rpmguard', name=name, envr=envr, kojitag=kojitag,
- config=autoqa_conf)
+ config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/rpmguard/rpmguard.py b/tests/rpmguard/rpmguard.py
index 61eec64..321dea6 100644
--- a/tests/rpmguard/rpmguard.py
+++ b/tests/rpmguard/rpmguard.py
@@ -52,7 +52,11 @@ rpmlint | cut -d ' ' -f 1", retain_output=True)
os.makedirs(self.rpmdir)
- def run_once(self, envr, name, kojitag):
+ def run_once(self, envr, name, kojitag, autotest_url):
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
+
# where to log output
out = open(os.path.join(self.resultsdir,'rpmguard.log'),'wb')
@@ -178,6 +182,7 @@ rpmlint | cut -d ' ' -f 1", retain_output=True)
# email results to mailing list
result_email = self.config.get('test','result_email')
if result_email:
+ mail_body = "Full logs available at <%s>\n\n%s" %
(results_url, log)
warning_count = len([line for line in log.splitlines() \
if line.startswith('W: ')])
print 'Sending email with results to %s ...' % result_email
@@ -186,7 +191,7 @@ rpmlint | cut -d ' ' -f 1", retain_output=True)
mail_server=self.config.get('test','smtpserver'),
subject='rpmguard: %u warnings for package %s' % \
(warning_count, envr),
- body = log)
+ body = mail_body)
# if some command failed, make this test fail
if test_result == 'FAIL':
diff --git a/tests/rpmlint/control b/tests/rpmlint/control
index a03be4e..c1fb55c 100644
--- a/tests/rpmlint/control
+++ b/tests/rpmlint/control
@@ -15,4 +15,5 @@ TEST_CATEGORY = 'Functional'
# name: package name
# kojitag: koji tag applied to this package
-job.run_test('rpmlint', name=name, envr=envr, kojitag=kojitag,
config=autoqa_conf)
+job.run_test('rpmlint', name=name, envr=envr, kojitag=kojitag,
config=autoqa_conf,
+ autotest_url="http://%s/results/%s/" % (autotest_server,
job.tag))
diff --git a/tests/rpmlint/rpmlint.py b/tests/rpmlint/rpmlint.py
index 7ad6f90..352ba0f 100644
--- a/tests/rpmlint/rpmlint.py
+++ b/tests/rpmlint/rpmlint.py
@@ -32,7 +32,11 @@ class rpmlint(test.test):
def setup(self):
utils.system('yum -y install rpmlint')
- def run_once(self, envr):
+ def run_once(self, envr, autotest_url):
+ # results_url points to the directory on autotest-server with
+ #the sotred results
+ results_url = "%s%s/" % (autotest_url, self.__class__.__name__)
+
koji = autoqa.koji_utils.SimpleKojiClientSession()
pkgurls = koji.nvr_to_urls(envr)
rpmdir = os.path.join(self.tmpdir, 'rpms')
@@ -63,6 +67,7 @@ class rpmlint(test.test):
# email results to mailing list
result_email = self.config.get('test','result_email')
if result_email:
+ mail_body = "Full logs available at <%s>\n\n%s" %
(results_url, self.results)
# parse last line for summary ('N errors, N warnings')
summary =
((self.results.splitlines()[-1]).split(';')[-1])[1:-1]
print 'Sending email with results to %s ...' % result_email
@@ -71,7 +76,7 @@ class rpmlint(test.test):
mail_server=self.config.get('test','smtpserver'),
subject='rpmlint: %s for package %s' % \
(summary, envr),
- body = self.results)
+ body = self.mail_body)
# if some command failed, make this test fail
if result == 'FAIL':
--
1.6.6.1