mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-10 10:47:22 +00:00
Use updated config.py classes
Let the default config file determined by the `CryptoConfig` class. Signed-off-by: Gabor Mezei <[email protected]>
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
# Copyright The Mbed TLS Contributors
|
# Copyright The Mbed TLS Contributors
|
||||||
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterable, Iterator, List, Optional, Tuple
|
from typing import Iterable, Iterator, List, Optional, Tuple
|
||||||
@@ -159,17 +158,10 @@ class ConfigTestGenerator(test_data_generation.TestGenerator):
|
|||||||
"""Generate test cases for configuration reporting."""
|
"""Generate test cases for configuration reporting."""
|
||||||
|
|
||||||
def __init__(self, settings):
|
def __init__(self, settings):
|
||||||
self.mbedtls_config = config.ConfigFile()
|
self.mbedtls_config = config.MbedTLSConfig()
|
||||||
self.targets['test_suite_config.mbedtls_boolean'] = \
|
self.targets['test_suite_config.mbedtls_boolean'] = \
|
||||||
lambda: enumerate_boolean_setting_cases(self.mbedtls_config)
|
lambda: enumerate_boolean_setting_cases(self.mbedtls_config)
|
||||||
# Temporary, while Mbed TLS does not just rely on the TF-PSA-Crypto
|
self.psa_config = config.CryptoConfig()
|
||||||
# build system to build its crypto library. When it does, the first
|
|
||||||
# case can just be removed.
|
|
||||||
if os.path.isdir('tf-psa-crypto'):
|
|
||||||
crypto_config_file = 'tf-psa-crypto/include/psa/crypto_config.h'
|
|
||||||
else:
|
|
||||||
crypto_config_file = 'include/psa/crypto_config.h'
|
|
||||||
self.psa_config = config.ConfigFile(crypto_config_file)
|
|
||||||
self.targets['test_suite_config.psa_boolean'] = \
|
self.targets['test_suite_config.psa_boolean'] = \
|
||||||
lambda: enumerate_boolean_setting_cases(self.psa_config)
|
lambda: enumerate_boolean_setting_cases(self.psa_config)
|
||||||
super().__init__(settings)
|
super().__init__(settings)
|
||||||
|
|||||||
Reference in New Issue
Block a user