Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
44a45f7c
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,发现更多精彩内容 >>
提交
44a45f7c
编写于
5月 30, 2017
作者:
R
Ralf Jung
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
run test suite also against libstd with full MIR
上级
6619ed89
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
21 deletion
+34
-21
.travis.yml
.travis.yml
+15
-2
README.md
README.md
+1
-1
src/bin/miri.rs
src/bin/miri.rs
+4
-0
tests/compile-fail/stack_limit.rs
tests/compile-fail/stack_limit.rs
+4
-10
tests/compiletest.rs
tests/compiletest.rs
+10
-8
未找到文件。
.travis.yml
浏览文件 @
44a45f7c
...
...
@@ -6,16 +6,29 @@ before_script:
-
rustup target add i686-unknown-linux-gnu
-
rustup target add i686-pc-windows-gnu
-
rustup target add i686-pc-windows-msvc
-
rustup component add rust-src
-
chmod +x -R ~/.rustup/toolchains/*/lib/rustlib/src/rust/src/jemalloc/include/jemalloc/
-
cargo install xargo
-
export RUST_SYSROOT=$HOME/rust
script
:
-
|
export RUST_SYSROOT=$HOME/rust &&
# Test plain miri
cargo build &&
cargo test &&
cargo install &&
cargo install
-
|
# Test cargo miri
cd cargo-miri-test &&
cargo miri &&
cargo miri test &&
cd ..
-
|
# get ourselves a MIR-ful libstd
cd xargo &&
RUSTFLAGS='-Zalways-encode-mir' xargo build &&
cd .. &&
# and run the tests with it
MIRI_SYSROOT=~/.xargo/HOST cargo test
notifications
:
email
:
on_success
:
never
...
...
README.md
浏览文件 @
44a45f7c
...
...
@@ -71,7 +71,7 @@ RUSTFLAGS='-Zalways-encode-mir' xargo build
Now you can run miri against the libstd compiled by xargo:
```
sh
cargo run
--bin
miri
--
--sysroot
~/.xargo/HOST
tests/run-pass/vecs.rs
MIRI_SYSROOT
=
~/.xargo/HOST cargo run
--bin
miri
tests/run-pass/vecs.rs
```
Notice that you will have to re-run the last step of the preparations above when
...
...
src/bin/miri.rs
浏览文件 @
44a45f7c
...
...
@@ -175,6 +175,10 @@ fn init_logger() {
}
fn
find_sysroot
()
->
String
{
if
let
Ok
(
sysroot
)
=
std
::
env
::
var
(
"MIRI_SYSROOT"
)
{
return
sysroot
;
}
// Taken from https://github.com/Manishearth/rust-clippy/pull/911.
let
home
=
option_env!
(
"RUSTUP_HOME"
)
.or
(
option_env!
(
"MULTIRUST_HOME"
));
let
toolchain
=
option_env!
(
"RUSTUP_TOOLCHAIN"
)
.or
(
option_env!
(
"MULTIRUST_TOOLCHAIN"
));
...
...
tests/compile-fail/stack_limit.rs
浏览文件 @
44a45f7c
#![feature(custom_attribute,
attr_literals)]
#![miri(stack_limit=
16
)]
//error-pattern: reached the configured maximum number of stack frames
fn
bar
()
{
foo
();
}
fn
foo
()
{
cake
();
//~ ERROR reached the configured maximum number of stack frames
cake
();
}
fn
cake
()
{
flubber
(
3
);
}
fn
flubber
(
i
:
u32
)
{
if
i
>
0
{
flubber
(
i
-
1
);
}
else
{
bar
();
}
bar
();
}
fn
main
()
{
...
...
tests/compiletest.rs
浏览文件 @
44a45f7c
...
...
@@ -65,14 +65,16 @@ fn for_all_targets<F: FnMut(String)>(sysroot: &Path, mut f: F) {
#[test]
fn
compile_test
()
{
let
sysroot
=
std
::
process
::
Command
::
new
(
"rustc"
)
.arg
(
"--print"
)
.arg
(
"sysroot"
)
.output
()
.expect
(
"rustc not found"
)
.stdout
;
let
sysroot
=
std
::
str
::
from_utf8
(
&
sysroot
)
.expect
(
"sysroot is not utf8"
)
.trim
();
let
sysroot
=
&
Path
::
new
(
&
sysroot
);
let
sysroot
=
std
::
env
::
var
(
"MIRI_SYSROOT"
)
.unwrap_or_else
(|
_
|
{
let
sysroot
=
std
::
process
::
Command
::
new
(
"rustc"
)
.arg
(
"--print"
)
.arg
(
"sysroot"
)
.output
()
.expect
(
"rustc not found"
)
.stdout
;
String
::
from_utf8
(
sysroot
)
.expect
(
"sysroot is not utf8"
)
});
let
sysroot
=
&
Path
::
new
(
sysroot
.trim
());
let
host
=
std
::
process
::
Command
::
new
(
"rustc"
)
.arg
(
"-vV"
)
.output
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录