Commit 157d0c09 authored by Jérome Perrin's avatar Jérome Perrin

Testcase bug fixes

Fixes false negative with ldd checks when not using `SLAPOS_TEST_SHARED_PART_LIST` and other small bug fixes.

See merge request !202
parents 6b855353 bf2ad8e9
......@@ -64,7 +64,7 @@ def makeModuleSetUpAndTestCaseClass(
verbose=bool(int(os.environ.get('SLAPOS_TEST_VERBOSE', 0))),
shared_part_list=[
os.path.expanduser(p) for p in os.environ.get(
'SLAPOS_TEST_SHARED_PART_LIST', '').split(os.pathsep)
'SLAPOS_TEST_SHARED_PART_LIST', '').split(os.pathsep) if p
],
snapshot_directory=os.environ.get('SLAPOS_TEST_LOG_DIRECTORY'),
):
......@@ -202,7 +202,9 @@ def checkSoftware(slap, software_url):
'*/parts/nss/*',
'*/node_modules/phantomjs*/*',
'*/grafana/tools/phantomjs/*',
'*/node_modules/puppeteer/*'
'*/node_modules/puppeteer/*',
# left over of compilation failures
'*/*__compile__/*',
))
software_hash = md5digest(software_url)
......@@ -268,6 +270,7 @@ def checkSoftware(slap, software_url):
Only libraries from `valid_paths_for_libs` are accepted.
Returns a list of error messages.
"""
valid_paths_for_libs = [os.path.realpath(x) for x in valid_paths_for_libs]
executable_link_error_list = []
for path in paths_to_check:
for root, dirs, files in os.walk(path):
......@@ -611,6 +614,7 @@ class SlapOSInstanceTestCase(unittest.TestCase):
Catches and log all exceptions and take snapshot named `snapshot_name` + the failing step.
"""
try:
if hasattr(cls, '_instance_parameter_dict'):
cls.requestDefaultInstance(state='destroyed')
except:
cls.logger.exception("Error during request destruction")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment