From 0555f71d91cb9d69ef2b14fb47de4799cc9e7043 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 21 Nov 2024 16:47:37 +0100 Subject: [PATCH] Create a framework for PSA test cases with automatic dependencies The new class `psa_test_case.TestCase` will automatically infer dependencies from the test data. The dependency inference is not done yet, this will be implemented in subsequent commits. No change to any generated file since this new module is not used yet. Signed-off-by: Gilles Peskine --- scripts/mbedtls_framework/psa_test_case.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/mbedtls_framework/psa_test_case.py diff --git a/scripts/mbedtls_framework/psa_test_case.py b/scripts/mbedtls_framework/psa_test_case.py new file mode 100644 index 000000000..198bbf148 --- /dev/null +++ b/scripts/mbedtls_framework/psa_test_case.py @@ -0,0 +1,20 @@ +"""Generate test cases for PSA API calls, with automatic dependencies. +""" + +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later +# + +from . import test_case + + +class TestCase(test_case.TestCase): + """A PSA test case with automatically inferred dependencies. + + For mechanisms like ECC curves where the support status includes + the key bit-size, this class assumes that only one bit-size is + involved in a given test case. + """ + + def __init__(self) -> None: + super().__init__()