Message ID | 20210119175208.763-4-alex.bennee@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | testing/next (docker binfmt tests) | expand |
On 1/19/21 6:52 PM, Alex Bennée wrote: > Depending on the linker/ldd setup we might get a file with no path. > Typically this is the psuedo library linux-vdso.so which doesn't > actually exist on the disk. Rather than try and catch these distro > specific edge cases just shout about it and try and continue. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > tests/docker/docker.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 0b4f6167b3..fb3de41c0b 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -103,7 +103,12 @@ def _copy_with_mkdir(src, root_dir, sub_path='.'): pass dest_file = "%s/%s" % (dest_dir, os.path.basename(src)) - copy(src, dest_file) + + try: + copy(src, dest_file) + except FileNotFoundError: + print("Couldn't copy %s to %s" % (src, dest_file)) + pass def _get_so_libs(executable):
Depending on the linker/ldd setup we might get a file with no path. Typically this is the psuedo library linux-vdso.so which doesn't actually exist on the disk. Rather than try and catch these distro specific edge cases just shout about it and try and continue. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/docker/docker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)