mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
tiny-test-fw: invoke expect callbacks in order of appearance
Previously the callbacks were invoked in the same order as the list of patterns to be matched.
This commit is contained in:
committed by
He Yin Ling
parent
4e9b4cb9cc
commit
7ca260554f
@ -623,7 +623,10 @@ class BaseDUT(object):
|
||||
data = self.data_cache.get_data(time_remaining)
|
||||
|
||||
if match_succeed:
|
||||
# do callback and flush matched data cache
|
||||
# sort matched items according to order of appearance in the input data,
|
||||
# so that the callbacks are invoked in correct order
|
||||
matched_expect_items = sorted(matched_expect_items, key=lambda it: it["index"])
|
||||
# invoke callbacks and flush matched data cache
|
||||
slice_index = -1
|
||||
for expect_item in matched_expect_items:
|
||||
# trigger callback
|
||||
|
Reference in New Issue
Block a user