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

Function tf_coverage_test_begin

tests/test_main.c:1393–1421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1391}
1392
1393void tf_coverage_test_begin(const char *test) {
1394#ifndef _WIN32
1395 tf_coverage_channel_observe();
1396 if (tf_coverage_channel_blocked()) {
1397 return;
1398 }
1399#endif
1400 char suite_dir[TF_COVERAGE_PATH_CAP];
1401 char own[CBM_SZ_512];
1402 if (!tf_coverage_dir[0] || tf_coverage_write_failed) {
1403 return;
1404 }
1405 int own_length = snprintf(own, sizeof(own), "%s.parent", test);
1406 if (own_length <= 0 || (size_t)own_length >= sizeof(own) ||
1407 !tf_coverage_suite_dir(suite_dir, sizeof(suite_dir)) ||
1408 !tf_coverage_route_setup(suite_dir)) {
1409 tf_coverage_lost(test);
1410 return;
1411 }
1412 if (!tf_coverage_flush()) {
1413 return;
1414 }
1415 tf_coverage_setup_index++;
1416 /* Named before the test runs, not after: a forked child that leaves through
1417 * exit() writes to the name it inherited, which must not be the setup file. */
1418 if (!tf_coverage_route(suite_dir, own, test)) {
1419 tf_coverage_lost(test);
1420 }
1421}
1422
1423void tf_coverage_test_end(const char *test) {
1424#ifndef _WIN32

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected