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

tests: Log more information before checking library setup

parent 6904d3bf
No related branches found
No related tags found
1 merge request!357Fix test failures with --no-copy-runtime
...@@ -84,6 +84,7 @@ class TestInsideRuntime(BaseTest): ...@@ -84,6 +84,7 @@ class TestInsideRuntime(BaseTest):
self.artifacts = Path(self.tmpdir.name) self.artifacts = Path(self.tmpdir.name)
self.artifacts.mkdir(exist_ok=True) self.artifacts.mkdir(exist_ok=True)
logger.info('Artifacts will be in %s', self.artifacts)
def tearDown(self) -> None: def tearDown(self) -> None:
super().tearDown() super().tearDown()
...@@ -149,11 +150,30 @@ class TestInsideRuntime(BaseTest): ...@@ -149,11 +150,30 @@ class TestInsideRuntime(BaseTest):
self.assertIsNotNone(data.get('BUILD_ID')) self.assertIsNotNone(data.get('BUILD_ID'))
def test_environ(self) -> None: 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('PATH: %r', os.environ.get('PATH'))
logger.info( logger.info(
'LD_LIBRARY_PATH: %r', os.environ.get('LD_LIBRARY_PATH') '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'): if os.environ.get('TEST_INSIDE_RUNTIME_IS_SCOUT'):
self.assertEqual(os.environ.get('STEAM_RUNTIME'), '/') self.assertEqual(os.environ.get('STEAM_RUNTIME'), '/')
elif os.environ.get('TEST_INSIDE_RUNTIME_IS_SOLDIER'): elif os.environ.get('TEST_INSIDE_RUNTIME_IS_SOLDIER'):
......
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