[PATCH] Polished upgradepath code - minor fixes.
by Josef Skladanka
---
tests/upgradepath/upgradepath.py | 44
++++++++++++-------------------------
1 files changed, 14 insertions(+), 30 deletions(-)
diff --git a/tests/upgradepath/upgradepath.py
b/tests/upgradepath/upgradepath.py
index 257eddc..a49fa07 100755
--- a/tests/upgradepath/upgradepath.py
+++ b/tests/upgradepath/upgradepath.py
@@ -36,17 +36,11 @@ from autotest_lib.client.common_lib import error
class upgradepath(AutoQATest):
version = 1 # increment if setup() changes
- test_result = 'PASS'
- log = []
- envr_list = set()
- def initialize(self, config):
- self.config = config_loader(config, self.tmpdir)
- #URL of logs/results stored on autotest-server
- self.autotest_url = autoqa.util.make_autotest_url(self.config)
-
- def setup(self):
- pass
+ def __init__(self, *args, **kwargs):
+ super(upgradepath, self).__init__(*args, **kwargs)
+ self.log = []
+ self.envr_list = set()
def compare(self, matching_build, tags, op):
koji = autoqa.koji_utils.SimpleKojiClientSession()
@@ -68,7 +62,7 @@ class upgradepath(AutoQATest):
print msg
self.log.append(msg)
else:
- self.test_result = 'FAIL'
+ self.result = 'FAILED'
msg ='{0:<7}{1}'.format('[FAIL]', tag)
print msg
self.log.append(msg)
@@ -85,11 +79,11 @@ class upgradepath(AutoQATest):
try:
current_tag = repotags.index(kojitag)
except ValueError:
- self.test_result = 'FAIL'
- msg = "ERROR: Entered bad kojitag"
- print msg
- self.log.append(msg)
- self.envr_list.add(matching_build['envr'])
+ self.result = 'FAILED'
+ self.summary = "ERROR: Entered bad kojitag"
+ print self.summary
+ self.log.append(self.summary)
+ self.outputs = "\n".join(self.log)
raise error.TestFail
hi_tags = repotags[(current_tag + 1):] # tags higher than current
@@ -136,20 +130,10 @@ class upgradepath(AutoQATest):
self.log.append(msg)
print msg
- self.result = self.test_result
- self.outputs = ""
- for i in self.log:
- self.outputs += i + '\n'
-
- self.outputs += '\n \n'
-
- packages_fail = ""
- for i in self.envr_list:
- packages_fail += i + ', '
- packages_fail = packages_fail[:-2]
-
- self.summary = packages_fail
+ self.outputs = "\n".join(self.log)
+ self.summary = ", ".join(self.envr_list)
- if self.test_result == 'FAIL':
+ if self.result == 'FAILED':
raise error.TestFail
+ self.result = "PASSED"
--
1.6.6.1
13 years, 8 months
[AutoQA] #123: rpmguard: check upgrade paths between releases
by fedora-badges
#123: rpmguard: check upgrade paths between releases
----------------------+-----------------------------------------------------
Reporter: wwoods | Owner:
Type: task | Status: new
Priority: major | Milestone:
Component: tests | Version: 1.0
Keywords: rpmguard |
----------------------+-----------------------------------------------------
(As pointed out by spot on the devel list:
http://lists.fedoraproject.org/pipermail/devel/2010-March/131746.html)
We should be emitting warning/error messages if the new package(s) have a
higher ENVR than the currently-released package(s) in any newer release.
For example, right now a new F11 package should be checked against the
corresponding package(s) in the current F12, branched F13, and rawhide
repos.
This involves a lot of extra repos and metadata, though. It's not a
trivial thing to add.
--
Ticket URL: <https://fedorahosted.org/autoqa/ticket/123>
AutoQA <http://autoqa.fedorahosted.org>
Automated QA project
13 years, 8 months
[AutoQA] #220: Check domains of running services after installation
by fedora-badges
#220: Check domains of running services after installation
---------------------+------------------------------------------------------
Reporter: adelton | Owner:
Type: task | Status: new
Priority: minor | Milestone:
Component: tests | Version: 1.0
Keywords: |
---------------------+------------------------------------------------------
Recently I've came across issue
https://bugzilla.redhat.com/show_bug.cgi?id=628495
when daemons run as initrc_t.
In this case it was in spite of the fact that there was a SELinux policy
module loaded, simply because the file context was pointing to a file that
no longer existed in that rpm and which was no longer run during service
startup.
I believe that with older Fedoras and with older versions of that package,
the file context was actually correct and the daemons run confined.
So avoid any such regressions, it would be nice when doing some post-
installation tests and starting services to also check the SELinux domain
of the processes that are started by those services (ps Z).
Thanks, Jan
--
Ticket URL: <https://fedorahosted.org/autoqa/ticket/220>
AutoQA <http://autoqa.fedorahosted.org>
Automated QA project
13 years, 8 months
[AutoQA] #111: depcheck test
by fedora-badges
#111: depcheck test
--------------------+-------------------------------------------------------
Reporter: wwoods | Owner:
Type: task | Status: new
Priority: major | Milestone: autoqa depcheck
Component: tests | Version: 1.0
Keywords: |
--------------------+-------------------------------------------------------
Write an actual depcheck test. This test should take, as inputs:
* one or more new package builds, and
* the name of a target repository for the new build(s)
The test should examine the PRCO (provides/requires/conflicts/obsoletes)
data for the new package(s) and the PRCO data for the target repository
(and all its parent repos).
The test should fail if the new builds would cause missing/broken
dependencies or unresolveable conflicts in the target repo(s).
--
Ticket URL: <https://fedorahosted.org/autoqa/ticket/111>
AutoQA <http://autoqa.fedorahosted.org>
Automated QA project
13 years, 8 months
Re: depcheck - next steps!
by Kamil Paral
----- "Will Woods" <wwoods(a)redhat.com> wrote:
>
> == write control/control.autoqa/test wrapper object ==
>
> I took a stab at this in the depcheck branch but I'm pretty sure I
> did
> it wrong / left some stuff out. Kamil/Joza, if you guys can give me
> some
> help/pointers here I'd appreciate it... but don't worry, I'll send
> the
> patch to the list for a final review before I merge anything.
>
I'm a little confused by all those files in tests/depcheck. There is
* depcheck
* depcheck.py
* depcheck_test.py
By our conventions the AutoQA test object should be called "depcheck.py".
Therefore we need to rename the actual script to something else, like
"run_depcheck.py" or similar.
It's not clear to me what the purpose of the current 'depcheck' file is,
I think its functionality can be easily integrated into the main depcheck
script itself (the one with proposed name "run_depcheck.py"), can't it?
13 years, 8 months
[AutoQA] #219: depcheck: NameError: global name 'rpmfluff' is not defined
by fedora-badges
#219: depcheck: NameError: global name 'rpmfluff' is not defined
--------------------+-------------------------------------------------------
Reporter: kparal | Owner: wwoods
Type: defect | Status: new
Priority: major | Milestone: Package Update Acceptance Test Plan - depcheck
Component: tests | Version: 1.0
Keywords: |
--------------------+-------------------------------------------------------
{{{
# ~autotest/client/site_tests/depcheck/depcheck --selftest
/usr/lib/python2.6/site-packages/rpmfluff.py:58: DeprecationWarning: The
popen2 module is deprecated. Use the subprocess module.
import popen2
EEEEEEEE
======================================================================
ERROR: test_createrepo (depcheck.DepcheckPrereqTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
277, in test_createrepo
rpmlist = simple_rpmlist()
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
249, in simple_rpmlist
m = rpmfluff.SimpleRpmBuild('mint', '1.0', '1')
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: test_rpmfluff (depcheck.DepcheckPrereqTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
260, in test_rpmfluff
p = rpmfluff.SimpleRpmBuild(n, v, r)
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: test_simple_yum_setup (depcheck.DepcheckPrereqTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
290, in test_simple_yum_setup
arch = rpmfluff.expectedArch
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: Test a changed Provides:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
317, in setUp
self.arch = rpmfluff.expectedArch
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: Make sure we accept a consistent repo, and no updates at all
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
317, in setUp
self.arch = rpmfluff.expectedArch
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: Make sure depcheck accepts a good update as expected
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
317, in setUp
self.arch = rpmfluff.expectedArch
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: make sure depcheck catches updates with missing requires
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
317, in setUp
self.arch = rpmfluff.expectedArch
NameError: global name 'rpmfluff' is not defined
======================================================================
ERROR: Test with one good and one bad update
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/autotest/client/site_tests/depcheck/depcheck.py", line
317, in setUp
self.arch = rpmfluff.expectedArch
NameError: global name 'rpmfluff' is not defined
----------------------------------------------------------------------
Ran 8 tests in 0.002s
FAILED (errors=8)
}}}
--
Ticket URL: <https://fedorahosted.org/autoqa/ticket/219>
AutoQA <http://autoqa.fedorahosted.org>
Automated QA project
13 years, 8 months