MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TensorFlowSrcRoot

Function TensorFlowSrcRoot

tensorflow/core/platform/posix/test.cc:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27int PickUnusedPortOrDie() { return internal::PickUnusedPortOrDie(); }
28
29string TensorFlowSrcRoot() {
30 // 'bazel test' sets TEST_SRCDIR, and also TEST_WORKSPACE if a new
31 // enough version of bazel is used.
32 const char* env = getenv("TEST_SRCDIR");
33 const char* workspace = getenv("TEST_WORKSPACE");
34 if (env && env[0] != '\0') {
35 if (workspace && workspace[0] != '\0') {
36 return strings::StrCat(env, "/", workspace, "/tensorflow");
37 } else {
38 return strings::StrCat(env, "/tensorflow");
39 }
40 } else {
41 LOG(WARNING) << "TEST_SRCDIR environment variable not set: "
42 << "using $PWD/tensorflow as TensorFlowSrcRoot() for tests.";
43 return "tensorflow";
44 }
45}
46
47} // namespace testing
48} // namespace tensorflow

Callers 15

TestSrcDirPathFunction · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
GetSamplesFilePathFunction · 0.50
XrtClientTestMethod · 0.50
CompareWithGoldenFileFunction · 0.50
BenchmarkHelperFunction · 0.50
TESTFunction · 0.50
GRPCClientTestBaseMethod · 0.50

Calls 1

StrCatFunction · 0.50

Tested by

no test coverage detected