]> code.ossystems Code Review - openembedded-core.git/commit
selftest/cases/runtime_test: ignore removal errors when cleaning temporary gpg directory
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Mon, 25 Sep 2017 21:02:46 +0000 (14:02 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Sep 2017 09:14:17 +0000 (10:14 +0100)
commitf28e8131f69913ff90ed210c7a58726d3ef37db6
tree357050931881e79c24a94b527ea46f7fc68c12b3
parent5301712f9735fcf8d3dec756772668de930e53fe
selftest/cases/runtime_test: ignore removal errors when cleaning temporary gpg directory

The high-level method tempfile.TemporaryDirectory give us no way to ignore erros on
removal thus use tempfile.mkdtemp instead. Ignoring possible issues on removal
is neccesary because it contains gpg sockets that are automatically removed by
the system once the process terminates, otherwise the following log is observed:

  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
  FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'

This is the same fix as 7e3a7cd2426feac757def81850dc44156cd0f33e, but this applies
to runtime (instead of signing).

[YOCTO #11821]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/runtime_test.py