Added utils.get_relative_path() to compute the path of an absolute path
as relative to a given directory path and used it when creating the
test results sysinfo/current_reboot symlink to create a relative symlink
that would still be valid when relocated.

Added a "preserve_symlinks" default False keyword argument to
AbstractSSHHost.get_file/send_file to tell rsync to try to preserve the
original symlink and not transform them into the referenced
file/directory when copied (only for rsync as scp has no way to do
this). Used the new flag when fetching the test result directory to
preserve symlinks. Along with the previous change this should fix an
issue of >100k sysinfo bloat because of duplicated content instead of
preserving the client symlink.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3104 592f7852-d20e-0410-864c-8624ca9c26a4
5 files changed