summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-07-04 11:17:21 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2012-07-04 11:19:26 +0200
commit9d6f8ddf4ff06013052d28263ce4e8c5e9140cb2 (patch)
tree91ecd6f75611140178c21122ebb5ef0653222425 /test
parenta2d2ef61f5f62a4f07b3f6b1d59dc17ad157b2bd (diff)
test: fix tests
Diffstat (limited to 'test')
-rw-r--r--test/test_cerbero_build_recipe.py10
-rw-r--r--test/test_cerbero_config.py8
-rw-r--r--test/test_cerbero_packages_pmdoc.py3
-rw-r--r--test/test_common.py3
4 files changed, 13 insertions, 11 deletions
diff --git a/test/test_cerbero_build_recipe.py b/test/test_cerbero_build_recipe.py
index 06f46ea0..0875a7c4 100644
--- a/test/test_cerbero_build_recipe.py
+++ b/test/test_cerbero_build_recipe.py
@@ -41,7 +41,7 @@ class Class2(object):
fetch = lambda x: 'CODEPASS'
-class RecipeTest(recipe.Recipe):
+class Recipe(recipe.Recipe):
btype = Class1
stype = Class2
@@ -66,7 +66,7 @@ class TestReceiptMetaClass(unittest.TestCase):
self.config = DummyConfig()
self.config.local_sources = ''
self.config.sources = ''
- self.t = RecipeTest(self.config)
+ self.t = Recipe(self.config)
def testReceiptBases(self):
r = recipe.Recipe(self.config)
@@ -96,7 +96,7 @@ class TestReceipt(unittest.TestCase):
self.config = DummyConfig()
self.config.local_sources = 'path1'
self.config.sources = 'path2'
- self.recipe = RecipeTest(self.config)
+ self.recipe = Recipe(self.config)
def testSources(self):
repo_dir = os.path.join(self.config.local_sources, self.recipe.package_name)
@@ -118,7 +118,7 @@ class TestReceipt(unittest.TestCase):
self.assertTrue(recipe.BuildSteps.FETCH in self.recipe._steps)
self.recipe._remove_steps([recipe.BuildSteps.FETCH])
self.assertTrue(recipe.BuildSteps.FETCH not in self.recipe._steps)
- r = RecipeTest(self.config)
+ r = Recipe(self.config)
self.assertTrue(recipe.BuildSteps.FETCH in r._steps)
@@ -128,7 +128,7 @@ class TestLicenses(unittest.TestCase):
self.config = DummyConfig()
self.config.local_sources = ''
self.config.sources = ''
- self.recipe = RecipeTest(self.config)
+ self.recipe = Recipe(self.config)
def testLicenses(self):
self.assertEquals(self.recipe.licenses, [License.LGPL])
diff --git a/test/test_cerbero_config.py b/test/test_cerbero_config.py
index 6384c713..30504d1b 100644
--- a/test/test_cerbero_config.py
+++ b/test/test_cerbero_config.py
@@ -186,18 +186,18 @@ class LinuxPackagesTest(unittest.TestCase):
config = Config(load=False)
config.recipes_dir = 'test'
config.external_recipes = {'test1': ('/path/to/repo', 1),
- 'test2': ('path/to/other/repo', 2)}
+ 'test2': ('/path/to/other/repo', 2)}
expected = {'default': ('test', 0),
'test1': ('/path/to/repo', 1),
- 'test2': ('path/to/other/repo', 2)}
+ 'test2': ('/path/to/other/repo', 2)}
self.assertEquals(config.get_recipes_repos(), expected)
def testPakcagesExternalRepositories(self):
config = Config(load=False)
config.packages_dir = 'test'
config.external_packages = {'test1': ('/path/to/repo', 1),
- 'test2': ('path/to/other/repo', 2)}
+ 'test2': ('/path/to/other/repo', 2)}
expected = {'default': ('test', 0),
'test1': ('/path/to/repo', 1),
- 'test2': ('path/to/other/repo', 2)}
+ 'test2': ('/path/to/other/repo', 2)}
self.assertEquals(config.get_packages_repos(), expected)
diff --git a/test/test_cerbero_packages_pmdoc.py b/test/test_cerbero_packages_pmdoc.py
index f91e491c..daaa1d83 100644
--- a/test/test_cerbero_packages_pmdoc.py
+++ b/test/test_cerbero_packages_pmdoc.py
@@ -107,7 +107,8 @@ class IndexTest(unittest.TestCase, XMLMixin):
self.fail("Incorrect choice %s" % choice)
elpkrefs = [x.attrib['id'] for x in \
choice.iterfind(Index.TAG_PKGREF)]
- self.assertEquals(sorted(["default.%s" %x for x in pkrefs]),
+ self.assertEquals(sorted(["default.%s.%s" %
+ (self.config.target_arch, x) for x in pkrefs]),
sorted(elpkrefs))
packages.extend(pkrefs)
diff --git a/test/test_common.py b/test/test_common.py
index d03988d1..c6949656 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -16,13 +16,14 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-from cerbero.config import Platform, Distro, DEFAULT_PACKAGER
+from cerbero.config import Platform, Distro, Architecture, DEFAULT_PACKAGER
class DummyConfig(object):
prefix = '/test/'
target_platform = Platform.WINDOWS
target_distro = Distro.WINDOWS
+ target_arch = Architecture.X86
platform = None
sources = ''
local_sources = ''