Browse Source

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] https://gitlab.com/buildroot.org/buildroot/-/commit/7470587cfa9a24d3c49adc0fb6cc60512907f31a
[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>
Julien Olivain 2 months ago
parent
commit
33947d6b5a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      support/testing/tests/package/sample_python_scp.py

+ 1 - 1
support/testing/tests/package/sample_python_scp.py

@@ -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")