[yum-cvs] 2 commits - rpmUtils/updates.py test/testbase.py
James Bowes
jbowes at linux.duke.edu
Tue Nov 6 19:46:47 UTC 2007
rpmUtils/updates.py | 7 +++----
test/testbase.py | 9 +++++++++
2 files changed, 12 insertions(+), 4 deletions(-)
New commits:
commit 3bdd1cb22a4334166ea698e3c50576fbb1f625e3
Author: Florian Festi <ffesti at redhat.com>
Date: Tue Nov 6 11:51:04 2007 +0100
Set arch for the depsolving/operation test cases
diff --git a/test/testbase.py b/test/testbase.py
index 33fa803..3c90636 100644
--- a/test/testbase.py
+++ b/test/testbase.py
@@ -17,6 +17,7 @@ from yum import packageSack
from yum.constants import TS_INSTALL_STATES, TS_REMOVE_STATES
from cli import YumBaseCli
import inspect
+from rpmUtils import arch
#############################################################
### Helper classes ##########################################
@@ -82,12 +83,19 @@ class _Container(object):
class _DepsolveTestsBase(unittest.TestCase):
res = {0 : 'empty', 2 : 'ok', 1 : 'err'}
+ canonArch = "x86_64"
def __init__(self, methodName='runTest'):
unittest.TestCase.__init__(self, methodName)
self.pkgs = _Container()
self.buildPkgs(self.pkgs)
+ def setUp(self):
+ self._canonArch = arch.canonArch
+ arch.canonArch = self.canonArch
+ def tearDown(self):
+ arch.canonArch = self._canonArch
+
@staticmethod
def buildPkgs(pkgs, *args):
"""Overload this staticmethod to create pkpgs that are used in several
@@ -158,6 +166,7 @@ class DepsolveTests(_DepsolveTestsBase):
def setUp(self):
""" Called at the start of each test. """
+ _DepsolveTestsBase.setUp(self)
self.tsInfo = transactioninfo.TransactionData()
self.rpmdb = packageSack.PackageSack()
self.xsack = packageSack.PackageSack()
commit 34db0e4c7783b0b7ceef70cd316f2021374090ce
Author: Florian Festi <ffesti at redhat.com>
Date: Tue Nov 6 15:51:20 2007 +0100
Make rpmUtils.update use rpmUtils.arch.canonArch to avoid problems with test cases
diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py
index 4a5eeba..861037f 100644
--- a/rpmUtils/updates.py
+++ b/rpmUtils/updates.py
@@ -38,10 +38,9 @@ class Updates:
self.exactarchlist = ['kernel', 'kernel-smp', 'glibc', 'kernel-hugemem',
'kernel-enterprise', 'kernel-bigmem', 'kernel-BOOT']
- self.myarch = rpmUtils.arch.getCanonArch() # this is for debugging only
- # set this if you want to
- # test on some other arch
- # otherwise leave it alone
+ self.myarch = rpmUtils.arch.canonArch # set this if you want to
+ # test on some other arch
+ # otherwise leave it alone
# make some dicts from installed and available
self.installdict = self.makeNADict(self.installed, 1)
More information about the Yum-cvs-commits
mailing list