Support incremental in compiletest for non-incremental modes.
This commit is contained in:
parent
0132f8258a
commit
2da6e66948
38 changed files with 179 additions and 132 deletions
|
@ -1,9 +1,10 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
|
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/extern-drop-glue
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
|
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=eager -Zshare-generics=y
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![crate_type="lib"]
|
#![crate_type="lib"]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/incremental-merging
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Ccodegen-units=3
|
// compile-flags:-Ccodegen-units=3
|
||||||
|
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/inlining-from-extern-crate
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus
|
// compile-flags:-Zinline-in-all-cgus
|
||||||
|
|
||||||
#![crate_type="lib"]
|
#![crate_type="lib"]
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
|
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-drop-glue
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
|
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/local-generic
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=eager
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![crate_type="lib"]
|
#![crate_type="lib"]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining-but-not-all
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus=no
|
// compile-flags:-Zinline-in-all-cgus=no
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus
|
// compile-flags:-Zinline-in-all-cgus
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-transitive-inlining
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus
|
// compile-flags:-Zinline-in-all-cgus
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
// ignore-test
|
// ignore-test
|
||||||
|
|
||||||
//
|
//
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/methods-are-with-self-type
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![feature(start)]
|
#![feature(start)]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/regular-modules
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=eager
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![crate_type="lib"]
|
#![crate_type="lib"]
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
// no-prefer-dynamic
|
// no-prefer-dynamic
|
||||||
// NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
|
// NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
|
||||||
// prevent drop-glue from participating in share-generics.
|
// prevent drop-glue from participating in share-generics.
|
||||||
// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Cincremental=tmp/partitioning-tests/shared-generics-exe -Copt-level=0
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Copt-level=0
|
||||||
|
|
||||||
#![crate_type="rlib"]
|
#![crate_type="rlib"]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/statics
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
|
|
||||||
#![crate_type="rlib"]
|
#![crate_type="rlib"]
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
// We specify -C incremental here because we want to test the partitioning for
|
// We specify incremental here because we want to test the partitioning for
|
||||||
// incremental compilation
|
// incremental compilation
|
||||||
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/vtable-through-const
|
// incremental
|
||||||
|
// compile-flags:-Zprint-mono-items=lazy
|
||||||
// compile-flags:-Zinline-in-all-cgus
|
// compile-flags:-Zinline-in-all-cgus
|
||||||
|
|
||||||
// This test case makes sure, that references made through constants are
|
// This test case makes sure, that references made through constants are
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// check-pass
|
// check-pass
|
||||||
// compile-flags:-Cincremental=tmp/traits-assoc-type-macros
|
// incremental
|
||||||
|
|
||||||
// This test case makes sure that we can compile with incremental compilation
|
// This test case makes sure that we can compile with incremental compilation
|
||||||
// enabled when there are macros, traits, inheritance and associated types involved.
|
// enabled when there are macros, traits, inheritance and associated types involved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// compile-flags:-Cincremental=tmp/issue-72442
|
// incremental
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// check-pass
|
// check-pass
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/issue-64964
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
// edition:2018
|
// edition:2018
|
||||||
|
|
||||||
// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
|
// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test that when a trait impl changes, fns whose body uses that trait
|
// Test that when a trait impl changes, fns whose body uses that trait
|
||||||
// must also be recompiled.
|
// must also be recompiled.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-assoc-type-codegen
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-assoc-type-codegen.rs:28:5
|
--> $DIR/dep-graph-assoc-type-codegen.rs:29:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test that immediate callers have to change when callee changes, but
|
// Test that immediate callers have to change when callee changes, but
|
||||||
// not callers' callers.
|
// not callers' callers.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-caller-callee
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-caller-callee.rs:20:5
|
--> $DIR/dep-graph-caller-callee.rs:21:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `x` to `typeck`
|
error: no path from `x` to `typeck`
|
||||||
--> $DIR/dep-graph-caller-callee.rs:31:5
|
--> $DIR/dep-graph-caller-callee.rs:32:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test cases where a changing struct appears in the signature of fns
|
// Test cases where a changing struct appears in the signature of fns
|
||||||
// and methods.
|
// and methods.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-struct-signature
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,131 +1,131 @@
|
||||||
error: no path from `WillChange` to `type_of`
|
error: no path from `WillChange` to `type_of`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:27:5
|
--> $DIR/dep-graph-struct-signature.rs:28:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `associated_item`
|
error: no path from `WillChange` to `associated_item`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:28:5
|
--> $DIR/dep-graph-struct-signature.rs:29:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(associated_item)]
|
LL | #[rustc_then_this_would_need(associated_item)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `trait_def`
|
error: no path from `WillChange` to `trait_def`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:29:5
|
--> $DIR/dep-graph-struct-signature.rs:30:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(trait_def)]
|
LL | #[rustc_then_this_would_need(trait_def)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:31:9
|
--> $DIR/dep-graph-struct-signature.rs:32:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
|
||||||
--> $DIR/dep-graph-struct-signature.rs:35:5
|
|
||||||
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:36:5
|
--> $DIR/dep-graph-struct-signature.rs:36:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:39:5
|
--> $DIR/dep-graph-struct-signature.rs:37:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:40:5
|
--> $DIR/dep-graph-struct-signature.rs:40:5
|
||||||
|
|
|
|
||||||
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: OK
|
||||||
|
--> $DIR/dep-graph-struct-signature.rs:41:5
|
||||||
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:45:5
|
--> $DIR/dep-graph-struct-signature.rs:46:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
|
||||||
--> $DIR/dep-graph-struct-signature.rs:47:9
|
|
||||||
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:48:9
|
--> $DIR/dep-graph-struct-signature.rs:48:9
|
||||||
|
|
|
|
||||||
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: OK
|
||||||
|
--> $DIR/dep-graph-struct-signature.rs:49:9
|
||||||
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:52:5
|
--> $DIR/dep-graph-struct-signature.rs:53:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
|
||||||
--> $DIR/dep-graph-struct-signature.rs:54:9
|
|
||||||
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:55:9
|
--> $DIR/dep-graph-struct-signature.rs:55:9
|
||||||
|
|
|
|
||||||
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
error: OK
|
||||||
|
--> $DIR/dep-graph-struct-signature.rs:56:9
|
||||||
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:60:9
|
--> $DIR/dep-graph-struct-signature.rs:61:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:62:9
|
--> $DIR/dep-graph-struct-signature.rs:63:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `type_of`
|
error: no path from `WillChange` to `type_of`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:67:5
|
--> $DIR/dep-graph-struct-signature.rs:68:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `type_of`
|
error: no path from `WillChange` to `type_of`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:74:5
|
--> $DIR/dep-graph-struct-signature.rs:75:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `fn_sig`
|
error: no path from `WillChange` to `fn_sig`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:76:9
|
--> $DIR/dep-graph-struct-signature.rs:77:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `fn_sig`
|
error: no path from `WillChange` to `fn_sig`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:80:5
|
--> $DIR/dep-graph-struct-signature.rs:81:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `fn_sig`
|
error: no path from `WillChange` to `fn_sig`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:83:5
|
--> $DIR/dep-graph-struct-signature.rs:84:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `WillChange` to `typeck`
|
error: no path from `WillChange` to `typeck`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:84:5
|
--> $DIR/dep-graph-struct-signature.rs:85:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test that adding an impl to a trait `Foo` DOES affect functions
|
// Test that adding an impl to a trait `Foo` DOES affect functions
|
||||||
// that only use `Bar` if they have methods in common.
|
// that only use `Bar` if they have methods in common.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-trait-impl-two-traits-same-method
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-trait-impl-two-traits-same-method.rs:32:5
|
--> $DIR/dep-graph-trait-impl-two-traits-same-method.rs:33:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `x::<impl Foo for u32>` to `typeck`
|
error: no path from `x::<impl Foo for u32>` to `typeck`
|
||||||
--> $DIR/dep-graph-trait-impl-two-traits-same-method.rs:41:5
|
--> $DIR/dep-graph-trait-impl-two-traits-same-method.rs:42:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test that adding an impl to a trait `Foo` does not affect functions
|
// Test that adding an impl to a trait `Foo` does not affect functions
|
||||||
// that only use `Bar`, so long as they do not have methods in common.
|
// that only use `Bar`, so long as they do not have methods in common.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-trait-impl-two-traits
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error: no path from `x::<impl Foo for char>` to `typeck`
|
error: no path from `x::<impl Foo for char>` to `typeck`
|
||||||
--> $DIR/dep-graph-trait-impl-two-traits.rs:31:5
|
--> $DIR/dep-graph-trait-impl-two-traits.rs:32:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `x::<impl Foo for char>` to `typeck`
|
error: no path from `x::<impl Foo for char>` to `typeck`
|
||||||
--> $DIR/dep-graph-trait-impl-two-traits.rs:40:5
|
--> $DIR/dep-graph-trait-impl-two-traits.rs:41:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test that when a trait impl changes, fns whose body uses that trait
|
// Test that when a trait impl changes, fns whose body uses that trait
|
||||||
// must also be recompiled.
|
// must also be recompiled.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-trait-impl
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-trait-impl.rs:27:5
|
--> $DIR/dep-graph-trait-impl.rs:28:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-trait-impl.rs:32:5
|
--> $DIR/dep-graph-trait-impl.rs:33:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-trait-impl.rs:37:5
|
--> $DIR/dep-graph-trait-impl.rs:38:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-trait-impl.rs:42:5
|
--> $DIR/dep-graph-trait-impl.rs:43:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `x::<impl Foo for char>` to `typeck`
|
error: no path from `x::<impl Foo for char>` to `typeck`
|
||||||
--> $DIR/dep-graph-trait-impl.rs:55:5
|
--> $DIR/dep-graph-trait-impl.rs:56:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Test that changing what a `type` points to does not go unnoticed.
|
// Test that changing what a `type` points to does not go unnoticed.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-type-alias
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,71 +1,71 @@
|
||||||
error: no path from `TypeAlias` to `type_of`
|
error: no path from `TypeAlias` to `type_of`
|
||||||
--> $DIR/dep-graph-type-alias.rs:17:1
|
--> $DIR/dep-graph-type-alias.rs:18:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:19:5
|
--> $DIR/dep-graph-type-alias.rs:20:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `TypeAlias` to `type_of`
|
error: no path from `TypeAlias` to `type_of`
|
||||||
--> $DIR/dep-graph-type-alias.rs:24:1
|
--> $DIR/dep-graph-type-alias.rs:25:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:27:9
|
--> $DIR/dep-graph-type-alias.rs:28:9
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `TypeAlias` to `type_of`
|
error: no path from `TypeAlias` to `type_of`
|
||||||
--> $DIR/dep-graph-type-alias.rs:33:1
|
--> $DIR/dep-graph-type-alias.rs:34:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:35:5
|
--> $DIR/dep-graph-type-alias.rs:36:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: no path from `TypeAlias` to `type_of`
|
error: no path from `TypeAlias` to `type_of`
|
||||||
--> $DIR/dep-graph-type-alias.rs:41:1
|
--> $DIR/dep-graph-type-alias.rs:42:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:43:5
|
--> $DIR/dep-graph-type-alias.rs:44:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:44:5
|
--> $DIR/dep-graph-type-alias.rs:45:5
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:48:1
|
--> $DIR/dep-graph-type-alias.rs:49:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(type_of)]
|
LL | #[rustc_then_this_would_need(type_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:51:1
|
--> $DIR/dep-graph-type-alias.rs:52:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(fn_sig)]
|
LL | #[rustc_then_this_would_need(fn_sig)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:52:1
|
--> $DIR/dep-graph-type-alias.rs:53:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(typeck)]
|
LL | #[rustc_then_this_would_need(typeck)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// Test that changing what a `type` points to does not go unnoticed
|
// Test that changing what a `type` points to does not go unnoticed
|
||||||
// by the variance analysis.
|
// by the variance analysis.
|
||||||
|
|
||||||
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-variance-alias
|
// incremental
|
||||||
|
// compile-flags: -Z query-dep-graph
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-variance-alias.rs:18:1
|
--> $DIR/dep-graph-variance-alias.rs:19:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_then_this_would_need(variances_of)]
|
LL | #[rustc_then_this_would_need(variances_of)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// edition:2018
|
// edition:2018
|
||||||
// compile-flags: -Cincremental=tmp/issue-72766
|
// incremental
|
||||||
|
|
||||||
pub struct SadGirl;
|
pub struct SadGirl;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Regression test for #87549.
|
// Regression test for #87549.
|
||||||
// compile-flags: -C incremental=tmp/wf/hir-wf-check-erase-regions
|
// incremental
|
||||||
|
|
||||||
pub struct Table<T, const N: usize>([Option<T>; N]);
|
pub struct Table<T, const N: usize>([Option<T>; N]);
|
||||||
|
|
||||||
|
|
|
@ -459,3 +459,9 @@ pub fn output_base_dir(config: &Config, testpaths: &TestPaths, revision: Option<
|
||||||
pub fn output_base_name(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
|
pub fn output_base_name(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
|
||||||
output_base_dir(config, testpaths, revision).join(testpaths.file.file_stem().unwrap())
|
output_base_dir(config, testpaths, revision).join(testpaths.file.file_stem().unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Absolute path to the directory to use for incremental compilation. Example:
|
||||||
|
/// /path/to/build/host-triple/test/ui/relative/testname.mode/testname.inc
|
||||||
|
pub fn incremental_dir(config: &Config, testpaths: &TestPaths) -> PathBuf {
|
||||||
|
output_base_name(config, testpaths, None).with_extension("inc")
|
||||||
|
}
|
||||||
|
|
|
@ -113,6 +113,21 @@ pub struct TestProps {
|
||||||
// testing harness and used when generating compilation
|
// testing harness and used when generating compilation
|
||||||
// arguments. (In particular, it propagates to the aux-builds.)
|
// arguments. (In particular, it propagates to the aux-builds.)
|
||||||
pub incremental_dir: Option<PathBuf>,
|
pub incremental_dir: Option<PathBuf>,
|
||||||
|
// If `true`, this test will use incremental compilation.
|
||||||
|
//
|
||||||
|
// This can be set manually with the `incremental` header, or implicitly
|
||||||
|
// by being a part of an incremental mode test. Using the `incremental`
|
||||||
|
// header should be avoided if possible; using an incremental mode test is
|
||||||
|
// preferred. Incremental mode tests support multiple passes, which can
|
||||||
|
// verify that the incremental cache can be loaded properly after being
|
||||||
|
// created. Just setting the header will only verify the behavior with
|
||||||
|
// creating an incremental cache, but doesn't check that it is created
|
||||||
|
// correctly.
|
||||||
|
//
|
||||||
|
// Compiletest will create the incremental directory, and ensure it is
|
||||||
|
// empty before the test starts. Incremental mode tests will reuse the
|
||||||
|
// incremental directory between passes in the same test.
|
||||||
|
pub incremental: bool,
|
||||||
// How far should the test proceed while still passing.
|
// How far should the test proceed while still passing.
|
||||||
pass_mode: Option<PassMode>,
|
pass_mode: Option<PassMode>,
|
||||||
// Ignore `--pass` overrides from the command line for this test.
|
// Ignore `--pass` overrides from the command line for this test.
|
||||||
|
@ -163,6 +178,7 @@ impl TestProps {
|
||||||
pretty_compare_only: false,
|
pretty_compare_only: false,
|
||||||
forbid_output: vec![],
|
forbid_output: vec![],
|
||||||
incremental_dir: None,
|
incremental_dir: None,
|
||||||
|
incremental: false,
|
||||||
pass_mode: None,
|
pass_mode: None,
|
||||||
fail_mode: None,
|
fail_mode: None,
|
||||||
ignore_pass: false,
|
ignore_pass: false,
|
||||||
|
@ -350,6 +366,10 @@ impl TestProps {
|
||||||
if !self.stderr_per_bitwidth {
|
if !self.stderr_per_bitwidth {
|
||||||
self.stderr_per_bitwidth = config.parse_stderr_per_bitwidth(ln);
|
self.stderr_per_bitwidth = config.parse_stderr_per_bitwidth(ln);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !self.incremental {
|
||||||
|
self.incremental = config.parse_incremental(ln);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,6 +380,10 @@ impl TestProps {
|
||||||
self.failure_status = 101;
|
self.failure_status = 101;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.mode == Mode::Incremental {
|
||||||
|
self.incremental = true;
|
||||||
|
}
|
||||||
|
|
||||||
for key in &["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
|
for key in &["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
|
||||||
if let Ok(val) = env::var(key) {
|
if let Ok(val) = env::var(key) {
|
||||||
if self.exec_env.iter().find(|&&(ref x, _)| x == key).is_none() {
|
if self.exec_env.iter().find(|&&(ref x, _)| x == key).is_none() {
|
||||||
|
@ -731,6 +755,10 @@ impl Config {
|
||||||
fn parse_edition(&self, line: &str) -> Option<String> {
|
fn parse_edition(&self, line: &str) -> Option<String> {
|
||||||
self.parse_name_value_directive(line, "edition")
|
self.parse_name_value_directive(line, "edition")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn parse_incremental(&self, line: &str) -> bool {
|
||||||
|
self.parse_name_directive(line, "incremental")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn expand_variables(mut value: String, config: &Config) -> String {
|
fn expand_variables(mut value: String, config: &Config) -> String {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore-tidy-filelength
|
// ignore-tidy-filelength
|
||||||
|
|
||||||
use crate::common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI_STDOUT};
|
use crate::common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI_STDOUT};
|
||||||
use crate::common::{output_base_dir, output_base_name, output_testname_unique};
|
use crate::common::{incremental_dir, output_base_dir, output_base_name, output_testname_unique};
|
||||||
use crate::common::{Assembly, Incremental, JsDocTest, MirOpt, RunMake, RustdocJson, Ui};
|
use crate::common::{Assembly, Incremental, JsDocTest, MirOpt, RunMake, RustdocJson, Ui};
|
||||||
use crate::common::{Codegen, CodegenUnits, DebugInfo, Debugger, Rustdoc};
|
use crate::common::{Codegen, CodegenUnits, DebugInfo, Debugger, Rustdoc};
|
||||||
use crate::common::{CompareMode, FailMode, PassMode};
|
use crate::common::{CompareMode, FailMode, PassMode};
|
||||||
|
@ -229,18 +229,24 @@ pub fn run(config: Config, testpaths: &TestPaths, revision: Option<&str>) {
|
||||||
print!("\n\n");
|
print!("\n\n");
|
||||||
}
|
}
|
||||||
debug!("running {:?}", testpaths.file.display());
|
debug!("running {:?}", testpaths.file.display());
|
||||||
let props = TestProps::from_file(&testpaths.file, revision, &config);
|
let mut props = TestProps::from_file(&testpaths.file, revision, &config);
|
||||||
|
if props.incremental {
|
||||||
|
props.incremental_dir = Some(incremental_dir(&config, testpaths));
|
||||||
|
}
|
||||||
|
|
||||||
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
||||||
create_dir_all(&cx.output_base_dir()).unwrap();
|
create_dir_all(&cx.output_base_dir()).unwrap();
|
||||||
|
if props.incremental {
|
||||||
|
cx.init_incremental_test();
|
||||||
|
}
|
||||||
|
|
||||||
if config.mode == Incremental {
|
if config.mode == Incremental {
|
||||||
// Incremental tests are special because they cannot be run in
|
// Incremental tests are special because they cannot be run in
|
||||||
// parallel.
|
// parallel.
|
||||||
assert!(!props.revisions.is_empty(), "Incremental tests require revisions.");
|
assert!(!props.revisions.is_empty(), "Incremental tests require revisions.");
|
||||||
cx.init_incremental_test();
|
|
||||||
for revision in &props.revisions {
|
for revision in &props.revisions {
|
||||||
let revision_props = TestProps::from_file(&testpaths.file, Some(revision), &config);
|
let mut revision_props = TestProps::from_file(&testpaths.file, Some(revision), &config);
|
||||||
|
revision_props.incremental_dir = props.incremental_dir.clone();
|
||||||
let rev_cx = TestCx {
|
let rev_cx = TestCx {
|
||||||
config: &config,
|
config: &config,
|
||||||
props: &revision_props,
|
props: &revision_props,
|
||||||
|
@ -2937,7 +2943,7 @@ impl<'test> TestCx<'test> {
|
||||||
// incremental workproduct directory. Delete any old
|
// incremental workproduct directory. Delete any old
|
||||||
// incremental work products that may be there from prior
|
// incremental work products that may be there from prior
|
||||||
// runs.
|
// runs.
|
||||||
let incremental_dir = self.incremental_dir();
|
let incremental_dir = self.props.incremental_dir.as_ref().unwrap();
|
||||||
if incremental_dir.exists() {
|
if incremental_dir.exists() {
|
||||||
// Canonicalizing the path will convert it to the //?/ format
|
// Canonicalizing the path will convert it to the //?/ format
|
||||||
// on Windows, which enables paths longer than 260 character
|
// on Windows, which enables paths longer than 260 character
|
||||||
|
@ -2947,7 +2953,7 @@ impl<'test> TestCx<'test> {
|
||||||
fs::create_dir_all(&incremental_dir).unwrap();
|
fs::create_dir_all(&incremental_dir).unwrap();
|
||||||
|
|
||||||
if self.config.verbose {
|
if self.config.verbose {
|
||||||
print!("init_incremental_test: incremental_dir={}", incremental_dir.display());
|
println!("init_incremental_test: incremental_dir={}", incremental_dir.display());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2974,46 +2980,30 @@ impl<'test> TestCx<'test> {
|
||||||
let revision = self.revision.expect("incremental tests require a list of revisions");
|
let revision = self.revision.expect("incremental tests require a list of revisions");
|
||||||
|
|
||||||
// Incremental workproduct directory should have already been created.
|
// Incremental workproduct directory should have already been created.
|
||||||
let incremental_dir = self.incremental_dir();
|
let incremental_dir = self.props.incremental_dir.as_ref().unwrap();
|
||||||
assert!(incremental_dir.exists(), "init_incremental_test failed to create incremental dir");
|
assert!(incremental_dir.exists(), "init_incremental_test failed to create incremental dir");
|
||||||
|
|
||||||
// Add an extra flag pointing at the incremental directory.
|
|
||||||
let mut revision_props = self.props.clone();
|
|
||||||
revision_props.incremental_dir = Some(incremental_dir);
|
|
||||||
|
|
||||||
let revision_cx = TestCx {
|
|
||||||
config: self.config,
|
|
||||||
props: &revision_props,
|
|
||||||
testpaths: self.testpaths,
|
|
||||||
revision: self.revision,
|
|
||||||
};
|
|
||||||
|
|
||||||
if self.config.verbose {
|
if self.config.verbose {
|
||||||
print!("revision={:?} revision_props={:#?}", revision, revision_props);
|
print!("revision={:?} props={:#?}", revision, self.props);
|
||||||
}
|
}
|
||||||
|
|
||||||
if revision.starts_with("rpass") {
|
if revision.starts_with("rpass") {
|
||||||
if revision_cx.props.should_ice {
|
if self.props.should_ice {
|
||||||
revision_cx.fatal("can only use should-ice in cfail tests");
|
self.fatal("can only use should-ice in cfail tests");
|
||||||
}
|
}
|
||||||
revision_cx.run_rpass_test();
|
self.run_rpass_test();
|
||||||
} else if revision.starts_with("rfail") {
|
} else if revision.starts_with("rfail") {
|
||||||
if revision_cx.props.should_ice {
|
if self.props.should_ice {
|
||||||
revision_cx.fatal("can only use should-ice in cfail tests");
|
self.fatal("can only use should-ice in cfail tests");
|
||||||
}
|
}
|
||||||
revision_cx.run_rfail_test();
|
self.run_rfail_test();
|
||||||
} else if revision.starts_with("cfail") {
|
} else if revision.starts_with("cfail") {
|
||||||
revision_cx.run_cfail_test();
|
self.run_cfail_test();
|
||||||
} else {
|
} else {
|
||||||
revision_cx.fatal("revision name must begin with rpass, rfail, or cfail");
|
self.fatal("revision name must begin with rpass, rfail, or cfail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Directory where incremental work products are stored.
|
|
||||||
fn incremental_dir(&self) -> PathBuf {
|
|
||||||
self.output_base_name().with_extension("inc")
|
|
||||||
}
|
|
||||||
|
|
||||||
fn run_rmake_test(&self) {
|
fn run_rmake_test(&self) {
|
||||||
let cwd = env::current_dir().unwrap();
|
let cwd = env::current_dir().unwrap();
|
||||||
let src_root = self.config.src_base.parent().unwrap().parent().unwrap().parent().unwrap();
|
let src_root = self.config.src_base.parent().unwrap().parent().unwrap().parent().unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue