Skip to content

Commit 25b4587

Browse files
Generalize config checks tests
This is mainly about the checks that are automatically generated by `generate_config_checks.py`, but we can also use it to assert manually written tests. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent 45290bc commit 25b4587

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/mbedtls_framework/test_config_checks_generator.py renamed to scripts/mbedtls_framework/unittest_config_checks.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
"""Test the configuration checks generated by generate_config_checks.py.
1+
"""Test the configuration checks that reject some bad compile-time configs.
2+
3+
This tests the output of ``generate_config_checks.py``.
4+
This can also let us verify what we enforce in the manually written
5+
checks in ``<PROJECT>_check_config.h``.
26
"""
37

48
## Copyright The Mbed TLS Contributors
@@ -12,7 +16,11 @@
1216

1317

1418
class TestConfigChecks(unittest.TestCase):
15-
"""Unit tests for checks generated by config_checks_generator."""
19+
"""Unit tests for checks performed via ``<PROJECT>_config.c``.
20+
21+
This can test the code generated by `config_checks_generator`,
22+
as well as manually written checks in `check_config.h`.
23+
"""
1624

1725
# Set this to the path to the source file containing the config checks.
1826
PROJECT_CONFIG_C = None #type: Optional[str]

0 commit comments

Comments
 (0)