diff options
author | bulatman <bulatman@yandex-team.ru> | 2022-02-10 16:45:50 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:50 +0300 |
commit | 2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (patch) | |
tree | 9142afc54d335ea52910662635b898e79e192e49 /library/cpp/testing/common/env.cpp | |
parent | 6560e4993b14d193f8c879e33a3de5e5eba6e21d (diff) | |
download | ydb-2f6ca198245aeffd5e2d82b65927c2465b68b4f5.tar.gz |
Restoring authorship annotation for <bulatman@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing/common/env.cpp')
-rw-r--r-- | library/cpp/testing/common/env.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/testing/common/env.cpp b/library/cpp/testing/common/env.cpp index a6acf90e2c..fa3a47fe16 100644 --- a/library/cpp/testing/common/env.cpp +++ b/library/cpp/testing/common/env.cpp @@ -1,5 +1,5 @@ -#include "env.h" - +#include "env.h" + #include <build/scripts/c_templates/svnversion.h> #include <util/folder/dirut.h> @@ -32,14 +32,14 @@ TString BuildRoot() { } } -TString ArcadiaFromCurrentLocation(TStringBuf where, TStringBuf path) { - return (TFsPath(ArcadiaSourceRoot()) / TFsPath(where).Parent() / path).Fix(); -} - -TString BinaryPath(TStringBuf path) { - return (TFsPath(BuildRoot()) / path).Fix(); -} - +TString ArcadiaFromCurrentLocation(TStringBuf where, TStringBuf path) { + return (TFsPath(ArcadiaSourceRoot()) / TFsPath(where).Parent() / path).Fix(); +} + +TString BinaryPath(TStringBuf path) { + return (TFsPath(BuildRoot()) / path).Fix(); +} + TString GetArcadiaTestsData() { TString atdRoot = NPrivate::GetTestEnv().ArcadiaTestsDataDir; if (atdRoot) { @@ -47,21 +47,21 @@ TString GetArcadiaTestsData() { } TString path = NPrivate::GetCwd(); - const char pathsep = GetDirectorySeparator(); + const char pathsep = GetDirectorySeparator(); while (!path.empty()) { TString dataDir = path + "/arcadia_tests_data"; - if (IsDir(dataDir)) { + if (IsDir(dataDir)) { return dataDir; - } + } - size_t pos = path.find_last_of(pathsep); - if (pos == TString::npos) { + size_t pos = path.find_last_of(pathsep); + if (pos == TString::npos) { pos = 0; - } + } path.erase(pos); } - return {}; + return {}; } TString GetWorkPath() { @@ -143,7 +143,7 @@ void StopProcessCoreWatching(int pid) { } } -bool FromYaTest() { +bool FromYaTest() { return NPrivate::GetTestEnv().IsRunningFromTest; } |