From d79e3b92fa88e514fad03b30a8722897faa0f7f4 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 29 Apr 2021 21:35:03 +0200 Subject: [PATCH] In NOT_SUPPORTED test case descriptions, show what is not supported Signed-off-by: Gilles Peskine --- tests/scripts/generate_psa_tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index f82a1e5b0..6c05b8937 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -335,7 +335,12 @@ class OpFail: #pylint: disable=too-many-arguments,too-many-locals tc = test_case.TestCase() pretty_alg = re.sub(r'PSA_ALG_', r'', alg.expression) - pretty_reason = reason.name.lower() + if reason == self.Reason.NOT_SUPPORTED: + short_deps = [re.sub(r'PSA_WANT_ALG_', r'', dep) + for dep in not_deps] + pretty_reason = '!' + '&'.join(sorted(short_deps)) + else: + pretty_reason = reason.name.lower() if kt: key_type = kt.expression pretty_type = re.sub(r'PSA_KEY_TYPE_', r'', key_type)