MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tf_coverage_route

Function tf_coverage_route

tests/test_main.c:1327–1339  ·  view source on GitHub ↗

Names the profile this process writes next and the one its children will. */

Source from the content-addressed store, hash-verified

1325
1326/* Names the profile this process writes next and the one its children will. */
1327static bool tf_coverage_route(const char *directory, const char *own, const char *child) {
1328 int own_length =
1329 snprintf(tf_coverage_profile, sizeof(tf_coverage_profile), "%s/%s.profraw", directory, own);
1330 /* `%c`: an exec'd child maps its counters onto the file (see Children). */
1331 int child_length = snprintf(tf_coverage_child_pattern, sizeof(tf_coverage_child_pattern),
1332 "%s/%s.%%p%%c.profraw", directory, child);
1333 if (own_length <= 0 || (size_t)own_length >= sizeof(tf_coverage_profile) || child_length <= 0 ||
1334 (size_t)child_length >= sizeof(tf_coverage_child_pattern)) {
1335 return false;
1336 }
1337 __llvm_profile_set_filename(tf_coverage_profile);
1338 return cbm_setenv("LLVM_PROFILE_FILE", tf_coverage_child_pattern, 1) == 0;
1339}
1340
1341/* Between tests the interval is suite setup, and so is any child it spawns. */
1342static bool tf_coverage_route_setup(const char *suite_dir) {

Callers 4

tf_coverage_route_setupFunction · 0.85
tf_coverage_test_beginFunction · 0.85
tf_coverage_test_endFunction · 0.85
tf_coverage_initFunction · 0.85

Calls 1

cbm_setenvFunction · 0.85

Tested by

no test coverage detected