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

tests: Install helper libraries into temporary directory


Otherwise, pv-adverb will be unable to detect the expansion of ${LIB}
or ${PLATFORM}, leading to a somewhat unrealistic test.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent cd18a3fd
No related branches found
No related tags found
1 merge request!635pv-runtime, pv-adverb: Use ${LIB} instead of ${PLATFORM} if possible
......@@ -161,6 +161,11 @@ class TestContainers(BaseTest):
logger.info('Copying %r to %r', src, dest)
shutil.copy2(src, dest)
@staticmethod
def copytree(src, dest):
logger.info('Copying %r to %r', src, dest)
shutil.copytree(src, dest, symlinks=True)
@classmethod
def setUpClass(cls) -> None:
super().setUpClass()
......@@ -322,6 +327,29 @@ class TestContainers(BaseTest):
),
tool_path,
)
dest_path = os.path.join(
cls.pv_dir,
'libexec',
'steam-runtime-tools-0',
multiarch,
)
in_containers_dir = os.path.join(
cls.containers_dir,
'pressure-vessel',
'libexec',
'steam-runtime-tools-0',
multiarch,
)
if os.path.exists(in_containers_dir):
# Asssume it's a close enough version that we can
# use it with the newer pressure-vessel-wrap.
logger.info(
'Copying pre-existing %s library stubs from %s',
multiarch, in_containers_dir,
)
cls.copytree(in_containers_dir, dest_path)
else:
cls.pv_dir = os.path.join(cls.containers_dir, 'pressure-vessel')
......
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