support/testing/infra: add log_file_path() function
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 17 Aug 2021 08:39:27 +0000 (10:39 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 29 Aug 2021 09:37:15 +0000 (11:37 +0200)
commit1259d40b0ab2d436fad088f4b9288b9899ef19a4
tree4052fabcf63debb3010166807eb8c038bb8e1edb
parent040f75aa06829595ef8f3d9dea9382ba152ee34e
support/testing/infra: add log_file_path() function

Some tests will need to grep through the build log to verify that some
features are working are expected. In order to allow them to open the
build log, we provide a new function called log_file_path(), which
returns the path to the log file if available.

We also use this function in open_log_file().

Note that open_log_file() cannot be used directly to grep through the
log file at the end of a build: because it opens in "a+" mode, it
greps starting from the end of the file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
support/testing/infra/__init__.py