Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
8e469272
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8e469272
编写于
2月 17, 2018
作者:
G
Guillaume Gomez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add command to launch only doc tests
上级
b85bd51c
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
15 addition
and
0 deletion
+15
-0
src/bootstrap/flags.rs
src/bootstrap/flags.rs
+10
-0
src/bootstrap/lib.rs
src/bootstrap/lib.rs
+2
-0
src/bootstrap/test.rs
src/bootstrap/test.rs
+3
-0
未找到文件。
src/bootstrap/flags.rs
浏览文件 @
8e469272
...
@@ -60,6 +60,7 @@ pub enum Subcommand {
...
@@ -60,6 +60,7 @@ pub enum Subcommand {
test_args
:
Vec
<
String
>
,
test_args
:
Vec
<
String
>
,
rustc_args
:
Vec
<
String
>
,
rustc_args
:
Vec
<
String
>
,
fail_fast
:
bool
,
fail_fast
:
bool
,
doc_tests
:
bool
,
},
},
Bench
{
Bench
{
paths
:
Vec
<
PathBuf
>
,
paths
:
Vec
<
PathBuf
>
,
...
@@ -164,6 +165,7 @@ pub fn parse(args: &[String]) -> Flags {
...
@@ -164,6 +165,7 @@ pub fn parse(args: &[String]) -> Flags {
"extra options to pass the compiler when running tests"
,
"extra options to pass the compiler when running tests"
,
"ARGS"
,
"ARGS"
,
);
);
opts
.optflag
(
""
,
"doc"
,
"run doc tests"
);
},
},
"bench"
=>
{
opts
.optmulti
(
""
,
"test-args"
,
"extra arguments"
,
"ARGS"
);
},
"bench"
=>
{
opts
.optmulti
(
""
,
"test-args"
,
"extra arguments"
,
"ARGS"
);
},
"clean"
=>
{
opts
.optflag
(
""
,
"all"
,
"clean all build artifacts"
);
},
"clean"
=>
{
opts
.optflag
(
""
,
"all"
,
"clean all build artifacts"
);
},
...
@@ -320,6 +322,7 @@ pub fn parse(args: &[String]) -> Flags {
...
@@ -320,6 +322,7 @@ pub fn parse(args: &[String]) -> Flags {
test_args
:
matches
.opt_strs
(
"test-args"
),
test_args
:
matches
.opt_strs
(
"test-args"
),
rustc_args
:
matches
.opt_strs
(
"rustc-args"
),
rustc_args
:
matches
.opt_strs
(
"rustc-args"
),
fail_fast
:
!
matches
.opt_present
(
"no-fail-fast"
),
fail_fast
:
!
matches
.opt_present
(
"no-fail-fast"
),
doc_tests
:
matches
.opt_present
(
"doc"
),
}
}
}
}
"bench"
=>
{
"bench"
=>
{
...
@@ -410,6 +413,13 @@ pub fn fail_fast(&self) -> bool {
...
@@ -410,6 +413,13 @@ pub fn fail_fast(&self) -> bool {
_
=>
false
,
_
=>
false
,
}
}
}
}
pub
fn
doc_tests
(
&
self
)
->
bool
{
match
*
self
{
Subcommand
::
Test
{
doc_tests
,
..
}
=>
doc_tests
,
_
=>
false
,
}
}
}
}
fn
split
(
s
:
Vec
<
String
>
)
->
Vec
<
String
>
{
fn
split
(
s
:
Vec
<
String
>
)
->
Vec
<
String
>
{
...
...
src/bootstrap/lib.rs
浏览文件 @
8e469272
...
@@ -226,6 +226,7 @@ pub struct Build {
...
@@ -226,6 +226,7 @@ pub struct Build {
rustfmt_info
:
channel
::
GitInfo
,
rustfmt_info
:
channel
::
GitInfo
,
local_rebuild
:
bool
,
local_rebuild
:
bool
,
fail_fast
:
bool
,
fail_fast
:
bool
,
doc_tests
:
bool
,
verbosity
:
usize
,
verbosity
:
usize
,
// Targets for which to build.
// Targets for which to build.
...
@@ -326,6 +327,7 @@ pub fn new(config: Config) -> Build {
...
@@ -326,6 +327,7 @@ pub fn new(config: Config) -> Build {
initial_cargo
:
config
.initial_cargo
.clone
(),
initial_cargo
:
config
.initial_cargo
.clone
(),
local_rebuild
:
config
.local_rebuild
,
local_rebuild
:
config
.local_rebuild
,
fail_fast
:
config
.cmd
.fail_fast
(),
fail_fast
:
config
.cmd
.fail_fast
(),
doc_tests
:
config
.cmd
.doc_tests
(),
verbosity
:
config
.verbose
,
verbosity
:
config
.verbose
,
build
:
config
.build
,
build
:
config
.build
,
...
...
src/bootstrap/test.rs
浏览文件 @
8e469272
...
@@ -1355,6 +1355,9 @@ fn run(self, builder: &Builder) {
...
@@ -1355,6 +1355,9 @@ fn run(self, builder: &Builder) {
if
test_kind
.subcommand
()
==
"test"
&&
!
build
.fail_fast
{
if
test_kind
.subcommand
()
==
"test"
&&
!
build
.fail_fast
{
cargo
.arg
(
"--no-fail-fast"
);
cargo
.arg
(
"--no-fail-fast"
);
}
}
if
build
.doc_tests
{
cargo
.arg
(
"--doc"
);
}
cargo
.arg
(
"-p"
)
.arg
(
krate
);
cargo
.arg
(
"-p"
)
.arg
(
krate
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录