testing/testcase: use realpath to compare paths
This supports the case where some paths used for shared parts are symlinks
Showing
-
Owner
I'm not sure this patch is correct. It was silly to think that it was a small innocent change that I can commit on master without running tests ... I'm checking this now.
-
Owner
ahah ! I checked on testnodes and
valid_paths_for_libs
is something like this:before: ('/srv/slapgrid/slappart9/srv/testnode/cxm/inst/test0-0/tmp/soft/1be550d21e789bd67bfb416fad6e864b', '/srv/slapgrid/slappart9/srv/testnode/cxm/inst/test0-0/tmp/shared', '')
We have an extra
''
at the end, this is because of a bug in this:shared_part_list=[ os.path.expanduser(p) for p in os.environ.get( 'SLAPOS_TEST_SHARED_PART_LIST', '').split(os.pathsep) ],
if we change to
realpath
, then the''
is expanded to current directory:after: ['/srv/slapgrid/slappart9/srv/testnode/cxm/inst/test0-0/tmp/soft/1be550d21e789bd67bfb416fad6e864b', '/srv/slapgrid/slappart9/srv/testnode/cxm/inst/test0-0/tmp/shared', '/srv/slapgrid/slappart9/srv/testnode/cxm/soft/174f168cce177c717e876a98f1dcfcfa/parts/slapos-repository/software/plantuml/test']
and the check for :
if any(lib_path.startswith(valid_path) for valid_path in valid_paths_for_libs): continue
was in fact always true ...
That's a bug, because the failures we now have on master are real problems, but let's revert for now and prepare a proper fix to this check and to all the missing rpaths in profiles.
Please register or sign in to comment