Automatically generate checkers for removed options

Read the list of historical config options in 3.6, compare that to 1.0/4.0
and emit the appropriate checkers.

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2025-09-24 17:20:35 +02:00
parent 24273c06db
commit 8e44a94d39
2 changed files with 25 additions and 8 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ class MbedtlsTestConfigChecks(unittest_config_checks.TestConfigChecks):
"""Error when redundantly setting a subproject internal option."""
self.bad_case('#define PSA_WANT_ALG_MD5 1',
'#define MBEDTLS_MD5_C',
error=r'MBEDTLS_MD5_C.* PSA_WANT_ALG_MD5 in psa/crypto_config\.h')
error=r'MBEDTLS_MD5_C is an internal macro')
def test_define_MBEDTLS_MD5_C_added(self) -> None:
"""Error when setting a subproject internal option that was disabled."""
@@ -68,7 +68,7 @@ class MbedtlsTestConfigChecks(unittest_config_checks.TestConfigChecks):
#undef MBEDTLS_MD5_C
''',
'#define MBEDTLS_MD5_C',
error=r'MBEDTLS_MD5_C.* PSA_WANT_ALG_MD5 in psa/crypto_config\.h')
error=r'MBEDTLS_MD5_C is an internal macro')
def test_define_MBEDTLS_BASE64_C_redundant(self) -> None:
"""Ok to redundantly set a subproject option."""