From e568daf213aa03d23813d6e739d2bda94a572a57 Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Mon, 10 Aug 2020 19:44:34 +0800 Subject: [PATCH] ttfw: fix idf performance check doesn't work --- tools/ci/python_packages/ttfw_idf/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/ci/python_packages/ttfw_idf/__init__.py b/tools/ci/python_packages/ttfw_idf/__init__.py index 95c5e0e200..d033cbd878 100644 --- a/tools/ci/python_packages/ttfw_idf/__init__.py +++ b/tools/ci/python_packages/ttfw_idf/__init__.py @@ -286,14 +286,16 @@ def check_performance(item, value, target): for performance_file in performance_files: try: - op, value = _find_perf_item(performance_file) + op, standard = _find_perf_item(performance_file) except (IOError, AttributeError): # performance file doesn't exist or match is not found in it continue - _check_perf(op, value) + _check_perf(op, standard) # if no exception was thrown then the performance is met and no need to continue break + else: + raise AssertionError("Failed to get performance standard for {}".format(item)) MINIMUM_FREE_HEAP_SIZE_RE = re.compile(r'Minimum free heap size: (\d+) bytes')