Florian Festi wrote:
Does the attached patch fix that for you? It simply simulates that you
are running on a x86_64 machine.
OK, a new, more generalized patch. It allows test cases to set canonArch on
a per class basis. Just do an
canonArch = "i386"
within the class body.
Florian
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()
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel