aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/dump_clang_coverage/write_profile_data.cpp
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-07-04 13:10:35 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-07-04 13:23:03 +0300
commitdc839589282441fd821d250b7f45aad750c160b1 (patch)
tree0081ba464f6ab8ed3456c7c7e96f2bbe4046084d /library/cpp/testing/dump_clang_coverage/write_profile_data.cpp
parent84979d9015a81c9b0411fe07aba50082694b22f7 (diff)
downloadydb-dc839589282441fd821d250b7f45aad750c160b1.tar.gz
Intermediate changes
commit_hash:dbea25354b9d29cff49103cf407ebbe86ba1e1f4
Diffstat (limited to 'library/cpp/testing/dump_clang_coverage/write_profile_data.cpp')
-rw-r--r--library/cpp/testing/dump_clang_coverage/write_profile_data.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/cpp/testing/dump_clang_coverage/write_profile_data.cpp b/library/cpp/testing/dump_clang_coverage/write_profile_data.cpp
index 8b13474cc8f..7efdc21e0eb 100644
--- a/library/cpp/testing/dump_clang_coverage/write_profile_data.cpp
+++ b/library/cpp/testing/dump_clang_coverage/write_profile_data.cpp
@@ -1,5 +1,6 @@
#include <dlfcn.h>
#include <linux/limits.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -118,8 +119,13 @@ void __attribute__((constructor)) premain() {
if (getenv("YA_COVERAGE_DUMP_PROFILE_AND_EXIT")) {
__llvm_profile_initialize_file();
int rc = __llvm_profile_write_file();
- if (!rc && getenv("YA_COVERAGE_DUMP_PROFILE_EXIT_CODE"))
+ if (!rc && getenv("YA_COVERAGE_DUMP_PROFILE_EXIT_CODE")) {
+ if (const char* token = getenv("YA_COVERAGE_DUMP_PROFILE_RELIABILITY_TOKEN")) {
+ fprintf(stdout, token);
+ fflush(stdout);
+ }
rc = atoi(getenv("YA_COVERAGE_DUMP_PROFILE_EXIT_CODE"));
+ }
exit(rc);
}
}