]> git.baikalelectronics.ru Git - uboot.git/commit
test/py: ensure a log section exists for skipped tests
authorStephen Warren <swarren@nvidia.com>
Mon, 17 Oct 2016 23:25:52 +0000 (17:25 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 23 Oct 2016 22:33:17 +0000 (18:33 -0400)
commit251cdc438a153c6da3e3d5febb883e8547f2e41d
tree77c92a20910ead36b86de1225a8ad078cf5b8568
parentc65abbd38d8c5505e5bdbda96ae764d557daa522
test/py: ensure a log section exists for skipped tests

In pytest 3, runtestprotocol() may not call pytest_runtest_setup() if
the test is skipped. That call is required to create a section for the
test in the log file. If this is skipped, the call to log.end_section()
at the tail of pytest_runtest_protocol() will throw an exception. This
patch ensures that a log section always exists, both to avoid the
exception and to ensure that a consistently structured log file is
always created.

Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reported-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Tom Rini <trini@konsulko.com>
test/py/conftest.py