pungi: Fix tests on non-x86_64 arches

If the test did not specify an arch explicitly, it fell back on whatever
arch the current machine has. This was causing failures when building
RPM.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-11-16 09:20:10 +01:00
parent b85d7ae787
commit 3c1e2fba66

View File

@ -65,6 +65,11 @@ class TestPungi(unittest.TestCase):
p.write_kickstart(self.ks, repos, groups, packages, prepopulate=prepopulate,
multilib_whitelist=multilib_whitelist)
kwargs.setdefault('cache_dir', self.tmp_dir)
# Unless the test specifies an arch, we need to default to x86_64.
# Otherwise the arch of current machine will be used, which will cause
# failure most of the time.
kwargs.setdefault('arch', 'x86_64')
p.run_pungi(self.ks, self.tmp_dir, 'DP', **kwargs)
with open(self.out, "r") as f:
pkg_map = p.get_packages(f.read())