Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
ceecd625
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,发现更多精彩内容 >>
提交
ceecd625
编写于
7月 12, 2017
作者:
M
Mark Simulacrum
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix more incorrectly transitioned code
上级
a5ab2cee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
59 addition
and
22 deletion
+59
-22
src/bootstrap/check.rs
src/bootstrap/check.rs
+29
-17
src/bootstrap/tool.rs
src/bootstrap/tool.rs
+30
-5
未找到文件。
src/bootstrap/check.rs
浏览文件 @
ceecd625
...
...
@@ -32,7 +32,7 @@
use
compile
;
use
native
;
use
builder
::{
Kind
,
Builder
,
Compiler
,
Step
};
use
tool
::
Tool
;
use
tool
::
{
self
,
Tool
}
;
const
ADB_TEST_DIR
:
&
str
=
"/data/tmp/work"
;
...
...
@@ -151,6 +151,17 @@ impl<'a> Step<'a> for Cargotest<'a> {
type
Output
=
();
const
ONLY_HOSTS
:
bool
=
true
;
fn
should_run
(
_
builder
:
&
Builder
,
path
:
&
Path
)
->
bool
{
path
.ends_with
(
"src/tools/cargotest"
)
}
fn
make_run
(
builder
:
&
Builder
,
_
path
:
Option
<&
Path
>
,
host
:
&
str
,
_
target
:
&
str
)
{
builder
.ensure
(
Cargotest
{
stage
:
builder
.top_stage
,
host
:
host
,
});
}
/// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler.
///
/// This tool in `src/tools` will check out a few Rust projects and run `cargo
...
...
@@ -786,6 +797,9 @@ fn make_run(builder: &Builder, _path: Option<&Path>, host: &str, _target: &str)
fn
run
(
self
,
builder
:
&
Builder
)
{
let
build
=
builder
.build
;
let
compiler
=
self
.compiler
;
builder
.ensure
(
compile
::
Test
{
compiler
,
target
:
compiler
.host
});
// Do a breadth-first traversal of the `src/doc` directory and just run
// tests for all files that end in `*.md`
let
mut
stack
=
vec!
[
build
.src
.join
(
"src/doc"
)];
...
...
@@ -1106,6 +1120,7 @@ fn run(self, builder: &Builder) {
(
"libtest"
,
"src/libtest"
,
String
::
new
(),
"test"
)
}
Mode
::
Librustc
=>
{
builder
.ensure
(
compile
::
Rustc
{
compiler
,
target
});
(
"librustc"
,
"src/rustc"
,
build
.rustc_features
(),
"rustc-main"
)
}
_
=>
panic!
(
"can only test libraries"
),
...
...
@@ -1261,16 +1276,6 @@ fn find_tests(dir: &Path, target: &str) -> Vec<PathBuf> {
dst
}
// // Some test suites are run inside emulators or on remote devices, and most
// // of our test binaries are linked dynamically which means we need to ship
// // the standard library and such to the emulator ahead of time. This step
// // represents this and is a dependency of all test suites.
// //
// // Most of the time this step is a noop (the `check::emulator_copy_libs`
// // only does work if necessary). For some steps such as shipping data to
// // QEMU we have to build our own tools so we've got conditional dependencies
// // on those programs as well. Note that the remote test client is built for
// // the build target (us) and the server is built for the target.
// rules.test("remote-copy-libs", "path/to/nowhere")
// .dep(|s| s.name("libtest"))
// .dep(move |s| {
...
...
@@ -1290,6 +1295,15 @@ fn find_tests(dir: &Path, target: &str) -> Vec<PathBuf> {
// .run(move |s| check::remote_copy_libs(build, &s.compiler(), s.target));
//
/// Some test suites are run inside emulators or on remote devices, and most
/// of our test binaries are linked dynamically which means we need to ship
/// the standard library and such to the emulator ahead of time. This step
/// represents this and is a dependency of all test suites.
///
/// Most of the time this is a noop. For some steps such as shipping data to
/// QEMU we have to build our own tools so we've got conditional dependencies
/// on those programs as well. Note that the remote test client is built for
/// the build target (us) and the server is built for the target.
#[derive(Serialize)]
pub
struct
RemoteCopyLibs
<
'a
>
{
compiler
:
Compiler
<
'a
>
,
...
...
@@ -1312,9 +1326,7 @@ fn run(self, builder: &Builder) {
println!
(
"REMOTE copy libs to emulator ({})"
,
target
);
t!
(
fs
::
create_dir_all
(
build
.out
.join
(
"tmp"
)));
// FIXME: This builds the tool for the native build triple
// (build.build); that is probably wrong. Should build for target.
let
server
=
builder
.tool_exe
(
Tool
::
RemoteTestServer
);
let
server
=
builder
.ensure
(
tool
::
RemoteTestServer
{
compiler
,
target
}));
// Spawn the emulator and wait for it to come online
let
tool
=
builder
.tool_exe
(
Tool
::
RemoteTestClient
);
...
...
@@ -1356,6 +1368,9 @@ impl<'a> Step<'a> for Distcheck {
fn
run
(
self
,
builder
:
&
Builder
)
{
let
build
=
builder
.build
;
builder
.ensure
(
dist
::
PlainSourceTarball
);
builder
.ensure
(
dist
::
Src
);
if
build
.build
!=
"x86_64-unknown-linux-gnu"
{
return
}
...
...
@@ -1366,9 +1381,6 @@ fn run(self, builder: &Builder) {
return
}
builder
.ensure
(
dist
::
PlainSourceTarball
);
builder
.ensure
(
dist
::
Src
);
println!
(
"Distcheck"
);
let
dir
=
build
.out
.join
(
"tmp"
)
.join
(
"distcheck"
);
let
_
=
fs
::
remove_dir_all
(
&
dir
);
...
...
src/bootstrap/tool.rs
浏览文件 @
ceecd625
...
...
@@ -239,11 +239,6 @@ fn run(self, builder: &Builder) -> PathBuf {
// .dep(|s| s.name("libstd-tool"))
// .run(move |s| compile::tool(build, s.stage, s.target, "build-manifest"));
BuildManifest
,
"src/tools/build-manifest"
,
"build-manifest"
,
Mode
::
Librustc
;
// rules.build("tool-remote-test-server", "src/tools/remote-test-server")
// .dep(|s| s.name("maybe-clean-tools"))
// .dep(|s| s.name("libstd-tool"))
// .run(move |s| compile::tool(build, s.stage, s.target, "remote-test-server"));
RemoteTestServer
,
"src/tools/remote-test-server"
,
"remote-test-server"
,
Mode
::
Libstd
;
// rules.build("tool-remote-test-client", "src/tools/remote-test-client")
// .dep(|s| s.name("maybe-clean-tools"))
// .dep(|s| s.name("libstd-tool"))
...
...
@@ -256,6 +251,36 @@ fn run(self, builder: &Builder) -> PathBuf {
RustInstaller
,
"src/tools/rust-installer"
,
"rust-installer"
,
Mode
::
Libstd
;
);
#[derive(Serialize)]
pub
struct
RemoteTestServer
<
'a
>
{
pub
compiler
:
Compiler
<
'a
>
,
pub
target
:
&
'a
str
,
}
impl
<
'a
>
Step
<
'a
>
for
RemoteTestServer
<
'a
>
{
type
Output
=
PathBuf
;
fn
should_run
(
_
builder
:
&
Builder
,
path
:
&
Path
)
->
bool
{
path
.ends_with
(
"src/tools/remote-test-server"
)
}
fn
make_run
(
builder
:
&
Builder
,
_
path
:
Option
<&
Path
>
,
host
:
&
str
,
target
:
&
str
)
{
builder
.ensure
(
RemoteTestServer
{
compiler
:
builder
.compiler
(
builder
.top_stage
,
host
),
target
,
});
}
fn
run
(
self
,
builder
:
&
Builder
)
->
PathBuf
{
builder
.ensure
(
ToolBuild
{
stage
:
self
.stage
,
target
:
self
.target
,
tool
:
"remote-test-server"
,
mode
:
Mode
::
Libstd
,
})
}
}
// rules.build("tool-cargo", "src/tools/cargo")
// .host(true)
// .default(build.config.extended)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录