3.1.35. waf_tools.validate_test_json

Validate the foxBMS unit test configuration files.

This module provides the top-level validation entry point for the unit-test configurations loaded by the foxBMS build system. It scans the configured test directories for C unit test files (matching the pattern test_*.c) and aborts the build with a descriptive error message if a test file is missing from the loaded configurations.

The validation ensures that every written unit test is compiled and executed by cross-referencing the files in the file system with the resolved test source nodes. This prevents scenarios where a developer adds a unit test but misses registering it in the accompanying configuration file.

It serves as the single entry point called from waf build scripts to verify the completeness of the test configuration before test compilation and execution proceed.

3.1.35.1. Usage

Call validate_test_configuration() during the waf build phase:

bld.load_test_configs()
bld.validate_test_configuration()

# Proceed to compile and run tests only if validation passes

3.1.35.2. Dependencies

Functions

validate_test_configuration(self)

Validate the loaded unit test configurations.