apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00233
[Merge] lp:~xnox/apport/xenial-s390x into lp:apport
Dimitri John Ledkov has proposed merging lp:~xnox/apport/xenial-s390x into lp:apport.
Requested reviews:
Brian Murray (brian-murray)
Apport upstream developers (apport-hackers)
For more details, see:
https://code.launchpad.net/~xnox/apport/xenial-s390x/+merge/304943
--
Your team Apport upstream developers is requested to review the proposed merge of lp:~xnox/apport/xenial-s390x into lp:apport.
=== modified file 'test/test_backend_apt_dpkg.py'
--- test/test_backend_apt_dpkg.py 2016-08-13 07:06:58 +0000
+++ test/test_backend_apt_dpkg.py 2016-09-05 16:08:31 +0000
@@ -804,7 +804,7 @@
impl.install_packages(self.rootdir, self.configdir, 'Foonux 1.2',
[('heimdal-dev', None)], False, self.cachedir,
permanent_rootdir=True)
- self.assertIn('heimdal/', os.readlink(include_path))
+ self.assertFalse(os.path.exists(include_path))
impl.install_packages(self.rootdir, self.configdir, 'Foonux 1.2',
[('libkrb5-dev', None)], False, self.cachedir,
@@ -838,6 +838,7 @@
self.assertIn('libc6_2.23-0ubuntu3_armhf.deb', cache)
@unittest.skipUnless(_has_internet(), 'online test')
+ @unittest.skipIf(impl.get_system_architecture() in ['arm64','powerpc','ppc64el','s390x'], 'test packages do not exist for these architectures')
def test_install_packages_from_launchpad(self):
'''install_packages() using packages only available on Launchpad'''
@@ -907,6 +908,7 @@
self.assertIn(('qemu-utils-dbgsym', '2.0.0+dfsg-2ubuntu1.11'), cache_versions)
@unittest.skipUnless(_has_internet(), 'online test')
+ @unittest.skipIf(impl.get_system_architecture() in ['arm64','powerpc','ppc64el','s390x'], 'test packages do not exist for these architectures')
def test_install_old_packages(self):
'''sandbox will install older package versions from launchpad'''
@@ -954,13 +956,13 @@
out_dir = os.path.join(self.workdir, 'out')
os.mkdir(out_dir)
impl._build_apt_sandbox(self.rootdir, os.path.join(self.configdir, 'Foonux 1.2', 'sources.list'),
- 'ubuntu', 'trusty', origins=None)
+ 'ubuntu', 'xenial', origins=None)
res = impl.get_source_tree('base-files', out_dir, sandbox=self.rootdir,
apt_update=True)
self.assertTrue(os.path.isdir(os.path.join(res, 'debian')))
# this needs to be updated when the release in _setup_foonux_config
# changes
- self.assertTrue(res.endswith('/base-files-7.2ubuntu5'),
+ self.assertTrue(res.endswith('/base-files-9.4ubuntu4'),
'unexpected version: ' + res.split('/')[-1])
@unittest.skipUnless(_has_internet(), 'online test')
@@ -970,12 +972,12 @@
os.mkdir(out_dir)
impl._build_apt_sandbox(self.rootdir, os.path.join(self.configdir, 'Foonux 1.2', 'sources.list'),
'ubuntu', 'trusty', origins=None)
- res = impl.get_source_tree('debian-installer', out_dir, version='20101020ubuntu318.16',
+ res = impl.get_source_tree('debian-installer', out_dir, version='20101020ubuntu451.5',
sandbox=self.rootdir, apt_update=True)
self.assertTrue(os.path.isdir(os.path.join(res, 'debian')))
# this needs to be updated when the release in _setup_foonux_config
# changes
- self.assertTrue(res.endswith('/debian-installer-20101020ubuntu318.16'),
+ self.assertTrue(res.endswith('/debian-installer-20101020ubuntu451.5'),
'unexpected version: ' + res.split('/')[-1])
@unittest.skipUnless(_has_internet(), 'online test')
@@ -1028,14 +1030,15 @@
'ubuntu', 'trusty', origins=['LP-PPA-%s' % ppa])
with open(os.path.join(self.rootdir, 'etc', 'apt', 'sources.list.d', ppa + '.list')) as f:
sources = f.read().splitlines()
- self.assertIn('deb http://ppa.launchpad.net/fooser/bar-ppa/ubuntu trusty main main/debug', sources)
- self.assertIn('deb-src http://ppa.launchpad.net/fooser/bar-ppa/ubuntu trusty main', sources)
+ self.assertIn('deb http://ppa.launchpad.net/fooser/bar-ppa/ubuntu xenial main main/debug', sources)
+ self.assertIn('deb-src http://ppa.launchpad.net/fooser/bar-ppa/ubuntu xenial main', sources)
@unittest.skipUnless(_has_internet(), 'online test')
+ @unittest.skipIf(impl.get_system_architecture() in ['arm64','powerpc','ppc64el','s390x'], 'test packages do not exist for these architectures')
def test_install_package_from_a_ppa(self):
'''Install a package from a PPA.'''
ppa = 'LP-PPA-brian-murray'
- self._setup_foonux_config()
+ self._setup_foonux_config(release='trusty')
obsolete = impl.install_packages(self.rootdir, self.configdir, 'Foonux 1.2',
[('apport',
'2.14.1-0ubuntu3.7~ppa4')
@@ -1051,7 +1054,7 @@
self.assertEqual(sandbox_ver('apport'),
'2.14.1-0ubuntu3.7~ppa4')
- def _setup_foonux_config(self, updates=False, release='trusty', ppa=False):
+ def _setup_foonux_config(self, updates=False, release='xenial', ppa=False):
'''Set up directories and configuration for install_packages()
If ppa is True, then a sources.list file for a PPA will be created
@@ -1059,6 +1062,10 @@
sandbox.
'''
+ archive_url = 'http://ports.ubuntu.com/'
+ if impl.get_system_architecture() in ['i386', 'amd64']:
+ archive_url = 'http://archive.ubuntu.com/ubuntu/'
+
self.cachedir = os.path.join(self.workdir, 'cache')
self.rootdir = os.path.join(self.workdir, 'root')
self.configdir = os.path.join(self.workdir, 'config')
@@ -1067,12 +1074,12 @@
os.mkdir(self.configdir)
os.mkdir(os.path.join(self.configdir, 'Foonux 1.2'))
with open(os.path.join(self.configdir, 'Foonux 1.2', 'sources.list'), 'w') as f:
- f.write('deb http://archive.ubuntu.com/ubuntu/ %s main\n' % release)
- f.write('deb-src http://archive.ubuntu.com/ubuntu/ %s main\n' % release)
+ f.write('deb %s %s main\n' % (archive_url, release))
+ f.write('deb-src %s %s main\n' % (archive_url, release))
f.write('deb http://ddebs.ubuntu.com/ %s main\n' % release)
if updates:
- f.write('deb http://archive.ubuntu.com/ubuntu/ %s-updates main\n' % release)
- f.write('deb-src http://archive.ubuntu.com/ubuntu/ %s-updates main\n' % release)
+ f.write('deb %s %s-updates main\n' % (archive_url, release))
+ f.write('deb-src %s %s-updates main\n' % (archive_url, release))
f.write('deb http://ddebs.ubuntu.com/ %s-updates main\n' % release)
if ppa:
os.mkdir(os.path.join(self.configdir, 'Foonux 1.2', 'sources.list.d'))
@@ -1113,6 +1120,7 @@
'i386': '80386',
'amd64': 'X86-64',
'armhf': 'ARM',
+ 's390x': 'IBM S/390',
}
# get ELF machine type
=== modified file 'test/test_ui.py'
--- test/test_ui.py 2016-01-13 07:03:25 +0000
+++ test/test_ui.py 2016-09-05 16:08:31 +0000
@@ -652,7 +652,8 @@
pid = int(stat[0])
break
- self.assertFalse(pid is None)
+ if pid is None:
+ raise unittest.SkipTest('No kernel threads found in /proc, in a container?!')
sys.argv = ['ui-test', '-f', '-P', str(pid)]
self.ui = TestSuiteUserInterface()
self.ui.present_details_response = {'report': True,