Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
4f922047
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,发现更多精彩内容 >>
提交
4f922047
编写于
11月 29, 2011
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make check-fast work
上级
82129873
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
90 addition
and
58 deletion
+90
-58
mk/tests.mk
mk/tests.mk
+88
-56
src/etc/combine-tests.py
src/etc/combine-tests.py
+2
-2
未找到文件。
mk/tests.mk
浏览文件 @
4f922047
...
...
@@ -29,7 +29,6 @@ PRETTY_TESTS := $(PRETTY_RS)
FT
:=
run_pass_stage2
FT_LIB
:=
$(
call
CFG_LIB_NAME,
$(FT)
)
FT_DRIVER
:=
$(FT)
_driver
GENERATED
+=
test
/
$(FT)
.rc
test
/
$(FT_DRIVER)
.rs
# The arguments to all test runners
ifdef
TESTNAME
...
...
@@ -75,10 +74,6 @@ check: tidy check-stage2 \
check-full
:
tidy check-stage1 check-stage2 check-stage3
\
check-fast
:
tidy
\
check-stage2-rustc check-stage2-std
\
test/$(FT_DRIVER).out
# Run the tidy script in multiple parts to avoid huge 'echo' commands
ifdef
CFG_NOTIDY
tidy
:
...
...
@@ -214,18 +209,18 @@ RFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
--mode
run-fail
\
$
$(CTEST_RUNTOOL)
RPASS_ARGS$(1)-T-$(2)-H-$(3)
:=
\
RPASS_ARGS$(1)-T-$(2)-H-$(3)
:=
\
$$
(
CTEST_COMMON_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
\
--src-base
$
$(S)
src/test/run-pass/
\
--build-base
$(3)
/test/run-pass/
\
--mode
run-pass
\
--mode
run-pass
\
$
$(CTEST_RUNTOOL)
BENCH_ARGS$(1)-T-$(2)-H-$(3)
:=
\
BENCH_ARGS$(1)-T-$(2)-H-$(3)
:=
\
$$
(
CTEST_COMMON_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
\
--src-base
$
$(S)
src/test/bench/
\
--build-base
$(3)
/test/bench/
\
--mode
run-pass
\
--mode
run-pass
\
$
$(CTEST_RUNTOOL)
PERF_ARGS$(1)-T-$(2)-H-$(3)
:=
\
...
...
@@ -261,32 +256,32 @@ PRETTY_PRETTY_ARGS$(1)-T-$(2)-H-$(3) := \
check-stage$(1)-T-$(2)-H-$(3)-cfail-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(CFAIL_TESTS)
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(CFAIL_TESTS)
@
$
$(
call
E, run cfail:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
CFAIL_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-rfail-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RFAIL_TESTS)
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RFAIL_TESTS)
@
$
$(
call
E, run rfail:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
RFAIL_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RPASS_TESTS)
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RPASS_TESTS)
@
$
$(
call
E, run rpass:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
RPASS_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-bench-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(BENCH_TESTS)
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(BENCH_TESTS)
@
$
$(
call
E, run bench:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
BENCH_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
...
...
@@ -300,33 +295,33 @@ check-stage$(1)-T-$(2)-H-$(3)-perf-dummy: \
$$
(
PERF_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RPASS_TESTS)
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RPASS_TESTS)
@
$
$(
call
E, run pretty-rpass:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
PRETTY_RPASS_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RFAIL_TESTS)
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(RFAIL_TESTS)
@
$
$(
call
E, run pretty-rfail:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
PRETTY_RFAIL_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(BENCH_TESTS)
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(BENCH_TESTS)
@
$
$(
call
E, run pretty-bench:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
PRETTY_BENCH_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-dummy
:
\
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(PRETTY_TESTS)
$$(HBIN$(1)_H_$(3))/compiletest$$(X)
\
$$(SREQ$(1)_T_$(2)_H_$(3))
\
$$(PRETTY_TESTS)
@
$
$(
call
E, run pretty-pretty:
$$
<
)
$
$(Q)
$
$(
call
CFG_RUN_CTEST,
$(1)
,
$$
<,
$(3)
)
\
$$
(
PRETTY_PRETTY_ARGS
$(1)
-T-
$(2)
-H-
$(3)
)
...
...
@@ -340,10 +335,57 @@ $(foreach host,$(CFG_TARGET_TRIPLES), \
$(eval
$(foreach
stage,$(STAGES),
\
$(eval
$(call
TEST_STAGEN,$(stage),$(target),$(host))))))))
# Make convenient Shorthand Targets for use on command
# line or by other rules:
######################################################################
# Fast-test rules
######################################################################
define
DEF_CHECK_SAME
GENERATED
+=
tmp/
$
$(FT)
.rc tmp/
$
$(FT_DRIVER)
.rs
tmp/$$(FT).rc tmp/$$(FT_DRIVER).rs
:
\
$$(TEST_RPASS_SOURCES_STAGE2)
\
$$(S)src/etc/combine-tests.py
@
$
$(
call
E, check: building combined stage2
test
runner
)
$
$(Q)
$
$(S)
src/etc/combine-tests.py
define
DEF_CHECK_FAST_FOR_T_H
# $(1) unused
# $(2) target triple
# $(3) host triple
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB)
:
\
tmp/$$(FT).rc
\
$$(SREQ2_T_$(2)_H_$(3))
@
$
$(
call
E, compile_and_link:
$$
@
)
$$
(
STAGE2_
$(CFG_HOST_TRIPLE)
)
--lib
-o
$$
@
$$
<
$(3)/test/$(FT_DRIVER)-$(2)$(X)
:
\
tmp/$(FT_DRIVER).rs
\
$(TLIB2_T_$(2)_H_$(3))/$(FT_LIB)
\
$(SREQ2_T_$(2)_H_$(3))
@
$(
call
E, compile_and_link:
$@
)
$
(
STAGE2_
$(CFG_HOST_TRIPLE)
)
-L
$(HOST_LIB2)
-o
$@
$<
$(3)/test/$(FT_DRIVER)-$(2).out
:
\
$(3)/test/$(FT_DRIVER)-$(2)$(X)
\
$(SREQ2_T_$(2)_H_$(3))
$(Q)
$(
call
CFG_RUN_TEST,
$<
,
$(2)
,
$(3)
)
check-fast-T-$(2)-H-$(3)
:
tidy
\
check-stage2-T-$(2)-H-$(3)-rustc
\
check-stage2-T-$(2)-H-$(3)-std
\
$(3)/test/$(FT_DRIVER)-$(2).out
endef
$(foreach
host,$(CFG_TARGET_TRIPLES),
\
$(eval
$(foreach
target,$(CFG_TARGET_TRIPLES),
\
$(eval
$(call
DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
######################################################################
# Shortcut rules
######################################################################
define
DEF_CHECK_FOR_STAGE_H
check-stage$(1)-H-$(2)
:
check-stage$(1)-T-$(2)-H-$(2)
check-stage$(1)-H-$(2)-perf
:
check-stage$(1)-T-$(2)-H-$(2)-perf
...
...
@@ -356,11 +398,20 @@ check-stage$(1)-H-$(2)-bench: check-stage$(1)-T-$(2)-H-$(2)-bench
endef
$(foreach
stage,$(STAGES),
\
$(foreach
stage,$(STAGES),
\
$(eval
$(foreach
target,$(CFG_TARGET_TRIPLES),
\
$(eval
$(call
DEF_CHECK_SAME,$(stage),$(target))))))
$(eval
$(call
DEF_CHECK_FOR_STAGE_H,$(stage),$(target))))))
define
DEF_CHECK_FAST_FOR_H
check-fast-H-$(1)
:
check-fast-T-$(1)-H-$(1)
endef
define
DEF_CHECK_HOST
$(foreach
target,$(CFG_TARGET_TRIPLES),
\
$(eval
$(call
DEF_CHECK_FAST_FOR_H,$(target))))
define
DEF_CHECK_FOR_STAGE
check-stage$(1)
:
check-stage$(1)-H-$(CFG_HOST_TRIPLE)
check-stage$(1)-perf
:
check-stage$(1)-H-$(CFG_HOST_TRIPLE)-perf
...
...
@@ -374,25 +425,6 @@ check-stage$(1)-bench: check-stage$(1)-H-$(CFG_HOST_TRIPLE)-bench
endef
$(foreach
stage,$(STAGES),
\
$(eval
$(call
DEF_CHECK_HOST,$(stage))))
######################################################################
# Fast-test rules
######################################################################
test/$(FT).rc test/$(FT_DRIVER).rs
:
$(TEST_RPASS_SOURCES_STAGE2)
\
$(S)src/etc/combine-tests.py
@
$(
call
E, check: building combined stage2
test
runner
)
$(Q)$(S)
src/etc/combine-tests.py
$(TARGET_HOST_LIB2)/$(FT_LIB)
:
test/$(FT).rc $(SREQ2$(CFG_HOST_TRIPLE))
@
$(
call
E, compile_and_link:
$@
)
$
(
STAGE2_
$(CFG_HOST_TRIPLE)
)
--lib
-o
$@
$<
test/$(FT_DRIVER)$(X)
:
test/$(FT_DRIVER).rs $(TARGET_HOST_LIB2)/$(FT_LIB)
\
$(SREQ2$(CFG_HOST_TRIPLE))
@
$(
call
E, compile_and_link:
$@
)
$
(
STAGE2_
$(CFG_HOST_TRIPLE)
)
-L
$(HOST_LIB2)
-o
$@
$<
$(eval
$(call
DEF_CHECK_FOR_STAGE,$(stage))))
test/$(FT_DRIVER).out
:
test/$(FT_DRIVER)$(X) $(SREQ2$(CFG_HOST_TRIPLE))
$(Q)
$(
call
CFG_RUN_TEST,
$<
,
$(CFG_HOST_TRIPLE)
,
$(CFG_HOST_TRIPLE)
)
check-fast
:
check-fast-H-$(CFG_HOST_TRIPLE)
\ No newline at end of file
src/etc/combine-tests.py
浏览文件 @
4f922047
...
...
@@ -36,7 +36,7 @@ for t in os.listdir(run_pass):
stage2_tests
.
sort
()
c
=
open
(
"t
est
/run_pass_stage2.rc"
,
"w"
)
c
=
open
(
"t
mp
/run_pass_stage2.rc"
,
"w"
)
i
=
0
c
.
write
(
"// AUTO-GENERATED FILE: DO NOT EDIT
\n
"
)
c
.
write
(
"#[link(name=
\"
run_pass_stage2
\"
, vers=
\"
0.1
\"
)];
\n
"
)
...
...
@@ -49,7 +49,7 @@ for t in stage2_tests:
c
.
close
()
d
=
open
(
"t
est
/run_pass_stage2_driver.rs"
,
"w"
)
d
=
open
(
"t
mp
/run_pass_stage2_driver.rs"
,
"w"
)
d
.
write
(
"// AUTO-GENERATED FILE: DO NOT EDIT
\n
"
)
d
.
write
(
"use std;
\n
"
)
d
.
write
(
"use run_pass_stage2;
\n
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录