diff --git a/CHANGES.rst b/CHANGES.rst index e62ac01a9..7b2140dd3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -25,6 +25,8 @@ Bug fixes in 23.1 labgrid-client. - Fix sftp option issue in SSH driver that caused sftp to only work once per test run. +- ManagedFile NFS detection heuristic now does symlink resolution on the + local host. Breaking changes in 23.1 ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/labgrid/util/managedfile.py b/labgrid/util/managedfile.py index 21ecf7655..2e06e8fef 100644 --- a/labgrid/util/managedfile.py +++ b/labgrid/util/managedfile.py @@ -31,7 +31,7 @@ class ManagedFile: """ local_path = attr.ib( validator=attr.validators.instance_of(str), - converter=lambda x: os.path.abspath(str(x)) + converter=lambda x: os.path.realpath(str(x)) ) resource = attr.ib( validator=attr.validators.instance_of(Resource), diff --git a/tests/test_flashscript.py b/tests/test_flashscript.py index f8b158534..d64642a87 100644 --- a/tests/test_flashscript.py +++ b/tests/test_flashscript.py @@ -2,6 +2,7 @@ import subprocess import tempfile import attr +import os from pathlib import Path from labgrid.driver.flashscriptdriver import FlashScriptDriver from labgrid.resource.common import ManagedResource @@ -69,4 +70,4 @@ def test_argument_device_expansion(target, resource, driver): def test_argument_file_expansion(target, driver): value = capture_argument_expansion(driver, "file.local_path") - assert value == "/bin/sh" + assert os.path.samefile(value, "/bin/sh")