support/testing: python-scp: fix test sample script

When the test was introduced in [1], a comparison of the source and
the destination file was added, with a typo (the method ".cmp" name is
missing).

The test is failing with error such as in [2]:

    Traceback (most recent call last):
      File "/root/sample_python_scp.py", line 15, in <module>
        assert filecmp("/etc/hostname", "/tmp/hostname")
               ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: 'module' object is not callable

This commit fixes that.

[1] 7470587cfa
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/11781378510

Cc: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Julien Olivain
2025-10-21 18:27:46 +02:00
parent c55714aeb9
commit 33947d6b5a

View File

@@ -12,4 +12,4 @@ ssh_client.connect('127.0.0.1', username='root')
scp_client = SCPClient(ssh_client.get_transport())
scp_client.get("/etc/hostname", "/tmp/hostname")
assert filecmp("/etc/hostname", "/tmp/hostname")
assert filecmp.cmp("/etc/hostname", "/tmp/hostname")