]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/selftest/context: Improve log file handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Nov 2018 12:07:53 +0000 (12:07 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Dec 2018 10:32:30 +0000 (10:32 +0000)
commit9c4c3c876dd5d224133571fcad1095af1098ae1d
tree451018bcb7b5a4659264b53ab7b5a4cb4fc89b19
parent7eb1f0be82d7ee12f893cdd40384da306fa597a7
oeqa/selftest/context: Improve log file handling

The existing logfile is simply placed in the current directory. Since the test
changes cwd to BUILDDIR, the symlink to the log can be placed in an invalid
directory. We also see trackbacks if the symlink is invalid.

Improve things by:

* Placing logs in LOG_DIR (or BUILDDIR if unset).
* Using a full path to the log meaning the log and link are placed in the same directory.
* Using lexists instead of exists so invalid symlinks are handled correctly.

(From OE-Core rev: 750ece11bed0e62a11e0003d1d16a81f7c219761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/context.py