From 7bb9fdb6d8bffe127a094277bc12d4a4189acd36 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Fri, 6 Aug 2021 15:31:34 +0100 Subject: [PATCH] tests: Log more information before checking library setup Signed-off-by: Simon McVittie <smcv@collabora.com> --- tests/pressure-vessel/inside-runtime.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/pressure-vessel/inside-runtime.py b/tests/pressure-vessel/inside-runtime.py index c1e65ee31..64296e68c 100755 --- a/tests/pressure-vessel/inside-runtime.py +++ b/tests/pressure-vessel/inside-runtime.py @@ -84,6 +84,7 @@ class TestInsideRuntime(BaseTest): self.artifacts = Path(self.tmpdir.name) self.artifacts.mkdir(exist_ok=True) + logger.info('Artifacts will be in %s', self.artifacts) def tearDown(self) -> None: super().tearDown() @@ -149,11 +150,30 @@ class TestInsideRuntime(BaseTest): self.assertIsNotNone(data.get('BUILD_ID')) def test_environ(self) -> None: + if os.getenv('TEST_INSIDE_RUNTIME_IS_COPY'): + logger.info('Runtime is a copy') + else: + logger.info('Runtime is not a copy') + + if os.getenv('TEST_INSIDE_RUNTIME_IS_SCOUT'): + logger.info('Runtime is scout') + else: + logger.info('Runtime is not scout') + + if os.getenv('TEST_INSIDE_RUNTIME_IS_SOLDIER'): + logger.info('Runtime is soldier') + else: + logger.info('Runtime is not soldier') + logger.info('PATH: %r', os.environ.get('PATH')) logger.info( 'LD_LIBRARY_PATH: %r', os.environ.get('LD_LIBRARY_PATH') ) + with open('/etc/ld.so.conf', 'r') as reader: + for line in reader: + logger.info('/etc/ld.so.conf: %r', line) + if os.environ.get('TEST_INSIDE_RUNTIME_IS_SCOUT'): self.assertEqual(os.environ.get('STEAM_RUNTIME'), '/') elif os.environ.get('TEST_INSIDE_RUNTIME_IS_SOLDIER'): -- GitLab