Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_38905368
tensorflow
提交
818644c2
T
tensorflow
项目概览
qq_38905368
/
tensorflow
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tensorflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
818644c2
编写于
2月 25, 2016
作者:
D
Derek Murray
提交者:
TensorFlower Gardener
2月 25, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changed testing::SrcDir() to testing::TensorFlowSourceRoot() and fixed it.
Also fixed some compiler warnings. Change: 115582482
上级
13d7f520
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
4 deletion
+16
-4
tensorflow/core/platform/posix/test.cc
tensorflow/core/platform/posix/test.cc
+13
-1
tensorflow/core/platform/test.cc
tensorflow/core/platform/test.cc
+0
-1
tensorflow/core/platform/test.h
tensorflow/core/platform/test.h
+3
-2
未找到文件。
tensorflow/core/platform/posix/test.cc
浏览文件 @
818644c2
...
...
@@ -45,7 +45,7 @@ class PosixSubProcess : public SubProcess {
// We are in the child process.
const
char
*
path
=
argv_
[
0
].
c_str
();
const
char
**
argv
=
new
const
char
*
[
argv_
.
size
()];
for
(
in
t
i
=
1
;
i
<
argv_
.
size
();
++
i
)
{
for
(
size_
t
i
=
1
;
i
<
argv_
.
size
();
++
i
)
{
argv
[
i
-
1
]
=
argv_
[
i
].
c_str
();
}
argv
[
argv_
.
size
()
-
1
]
=
nullptr
;
...
...
@@ -177,5 +177,17 @@ int PickUnusedPortOrDie() {
return
0
;
}
string
TensorFlowSrcRoot
()
{
// 'bazel test' sets TEST_SRCDIR
const
char
*
env
=
getenv
(
"TEST_SRCDIR"
);
if
(
env
&&
env
[
0
]
!=
'\0'
)
{
return
strings
::
StrCat
(
env
,
"/tensorflow"
);
}
else
{
LOG
(
WARNING
)
<<
"TEST_SRCDIR environment variable not set: "
<<
"using $PWD/tensorflow as TensorFlowSrcRoot() for tests."
;
return
"tensorflow"
;
}
}
}
// namespace testing
}
// namespace tensorflow
tensorflow/core/platform/test.cc
浏览文件 @
818644c2
...
...
@@ -25,7 +25,6 @@ namespace testing {
#if defined(PLATFORM_GOOGLE) || defined(__ANDROID__)
string
TmpDir
()
{
return
FLAGS_test_tmpdir
;
}
string
SrcDir
()
{
return
FLAGS_test_srcdir
;
}
int
RandomSeed
()
{
return
FLAGS_test_random_seed
;
}
#else
string
TmpDir
()
{
...
...
tensorflow/core/platform/test.h
浏览文件 @
818644c2
...
...
@@ -35,8 +35,9 @@ namespace testing {
// Return a temporary directory suitable for temporary testing files.
string
TmpDir
();
// Returns the source directory containing data dependencies.
string
SrcDir
();
// Returns the path to TensorFlow in the directory containing data
// dependencies.
string
TensorFlowSrcRoot
();
// Return a random number generator seed to use in randomized tests.
// Returns the same value for the lifetime of the process.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录