add new pytest_handlecrashitem hook

allows handling and rescheduling crash tests

PR #651

Co-authored-by: xoviat <xoviat@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
xoviat
2021-04-27 07:07:49 -05:00
committed by GitHub
parent f5665436e9
commit f861f1667d
7 changed files with 77 additions and 0 deletions

View File

@@ -151,6 +151,14 @@ class LoadScheduling:
self.node2pending[node].remove(item_index)
self.check_schedule(node, duration=duration)
def mark_test_pending(self, item):
self.pending.insert(
0,
self.collection.index(item),
)
for node in self.node2pending:
self.check_schedule(node)
def check_schedule(self, node, duration=0):
"""Maybe schedule new items on the node