fix(hal): Fixed crypto test app

Previously the crypto test app was not verifying
    that the no of failures is 0.
    Added the check to verify that
This commit is contained in:
Aditya Patwardhan 2024-06-08 18:41:52 +05:30
parent d41c9d948d
commit e5fcc2d315
No known key found for this signature in database
GPG Key ID: E628B2648FBF0DD8

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import os
@ -13,6 +13,11 @@ def test_crypto(dut: Dut) -> None:
# as tests for efuses burning security peripherals would be run
timeout = 600 if os.environ.get('IDF_ENV_FPGA') else 60
test_numbers = dut.expect(r'(\d+) Tests (\d+) Failures (\d+) Ignored', timeout=timeout)
failures = test_numbers.group(2).decode()
ignored = test_numbers.group(3).decode()
assert failures == '0', f'No of failures must be 0 (is {failures})'
assert ignored == '0', f'No of Ignored test must be 0 (is {ignored})'
dut.expect('Tests finished', timeout=timeout)