gcov: Output mode judgment is implemented in the kernel layer

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2025-03-31 15:59:28 +08:00 committed by Xiang Xiao
parent dfbaedd5c2
commit 92c490579d

View file

@ -63,7 +63,6 @@ int main(int argc, FAR char *argv[])
{
FAR const char *strip = CONFIG_COVERAGE_DEFAULT_PREFIX_STRIP;
FAR const char *path = NULL;
bool onefile = false;
int option;
while ((option = getopt(argc, argv, "d::t:orh")) != ERROR)
@ -91,20 +90,6 @@ int main(int argc, FAR char *argv[])
}
}
if (access(path, F_OK) == 0)
{
onefile = true;
}
if (onefile)
{
setenv("GCOV_DUMP_ONEFILE", "1", 1);
}
else
{
setenv("GCOV_DUMP_ONEFILE", "0", 1);
}
setenv("GCOV_PREFIX_STRIP", strip, 1);
setenv("GCOV_PREFIX", path, 1);
__gcov_dump();