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

Function tf_coverage_test_end

tests/test_main.c:1423–1451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421}
1422
1423void tf_coverage_test_end(const char *test) {
1424#ifndef _WIN32
1425 tf_coverage_channel_observe();
1426 if (tf_coverage_channel_blocked()) {
1427 return;
1428 }
1429#endif
1430 char suite_dir[TF_COVERAGE_PATH_CAP];
1431 char own[CBM_SZ_512];
1432 if (!tf_coverage_dir[0] || tf_coverage_write_failed) {
1433 return;
1434 }
1435 int own_length = snprintf(own, sizeof(own), "%s.parent", test);
1436 if (own_length <= 0 || (size_t)own_length >= sizeof(own) ||
1437 !tf_coverage_suite_dir(suite_dir, sizeof(suite_dir)) ||
1438 !tf_coverage_route(suite_dir, own, test)) {
1439 tf_coverage_lost(test);
1440 return;
1441 }
1442 if (!tf_coverage_flush()) {
1443 return;
1444 }
1445 /* The runtime writes once more at exit, to whatever name is current. Left
1446 * on the file of this test, that write would replace the profile just
1447 * taken with the teardown that follows it. */
1448 if (!tf_coverage_route_setup(suite_dir)) {
1449 tf_coverage_lost(test);
1450 }
1451}
1452
1453/* False when the run asked for coverage and cannot have it. Children run in
1454 * other working directories, so they are handed an absolute name. */

Callers

nothing calls this directly

Calls 7

tf_coverage_suite_dirFunction · 0.85
tf_coverage_routeFunction · 0.85
tf_coverage_lostFunction · 0.85
tf_coverage_flushFunction · 0.85
tf_coverage_route_setupFunction · 0.85

Tested by

no test coverage detected