Skip to content
Snippets Groups Projects
Commit 0605ce04 authored by Simon McVittie's avatar Simon McVittie
Browse files

containers test: Assert that scout gets host libc-related files


For gconv we only make the assertion for a Debian host for now,
because non-Debian hosts put their gconv libraries in different places.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 9cc0c933
No related branches found
No related tags found
No related merge requests found
......@@ -595,7 +595,7 @@ class TestContainers(BaseTest):
link = os.path.join(libdir, 'dri', k)
target = os.readlink(link)
self.assertEqual(target[:10], '/run/host/')
target = target[10:]
target = target[9:] # includes the / after host/
# Again, take the realpath() on non-Debian-derived
# hosts, but be more strict on Debian.
......@@ -605,6 +605,33 @@ class TestContainers(BaseTest):
self.assertIn(target, vs)
if is_scout:
if self.host_is_debian_derived:
link = os.path.join(
tree, 'usr', 'lib', multiarch, 'gconv',
)
target = os.readlink(link)
self.assertEqual(
target,
'/run/host/usr/lib/{}/gconv'.format(multiarch),
)
if is_scout:
if os.path.isdir('/usr/lib/locale'):
link = os.path.join(tree, 'usr', 'lib', 'locale')
target = os.readlink(link)
self.assertEqual(target, '/run/host/usr/lib/locale')
if os.path.isdir('/usr/share/i18n'):
link = os.path.join(tree, 'usr', 'share', 'i18n')
target = os.readlink(link)
self.assertEqual(target, '/run/host/usr/share/i18n')
link = os.path.join(tree, 'sbin', 'ldconfig')
target = os.readlink(link)
# Might not be /sbin/ldconfig, for example on non-Debian hosts
self.assertRegex(target, r'^/run/host/')
def test_scout_sysroot(self) -> None:
scout = os.path.join(self.containers_dir, 'scout_sysroot')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment