Use lists rather than sets to record the status of tests. This causes
the test summary in the HTML file to be generated in the same order as
the tests are (or would have been) run. This makes it easier to locate
the first failed test. The log for this test might have interesting
first clues re: interaction with the environment (e.g. hardware flashing,
serial console, ...) and may help tracking down external issues.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
return console
anchors = {}
-tests_not_run = set()
-tests_failed = set()
-tests_xpassed = set()
-tests_xfailed = set()
-tests_skipped = set()
-tests_passed = set()
+tests_not_run = []
+tests_failed = []
+tests_xpassed = []
+tests_xfailed = []
+tests_skipped = []
+tests_passed = []
def pytest_itemcollected(item):
"""pytest hook: Called once for each test found during collection.
Nothing.
"""
- tests_not_run.add(item.name)
+ tests_not_run.append(item.name)
def cleanup():
"""Clean up all global state.
if failure_cleanup:
console.drain_console()
- test_list.add(item.name)
+ test_list.append(item.name)
tests_not_run.remove(item.name)
try: