Skip to content

Commit c798dff

Browse files
committed
Auto merge of #63029 - petrochenkov:rpass, r=Centril
Move run-pass tests to ui This is the second attempt at doing #53994 (which was previously reverted in #54530). The issue with inability to run the test suite in a faster way (#54047) that motivated the revert was recently addressed by #61755. r? @Centril
2 parents a5e7bb3 + f1c8673 commit c798dff

File tree

3,336 files changed

+1175
-324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,336 files changed

+1175
-324
lines changed

Diff for: src/bootstrap/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ The script accepts commands, flags, and arguments to determine what to do:
5555
# run all unit tests
5656
./x.py test
5757
58-
# execute the run-pass test suite
59-
./x.py test src/test/run-pass
58+
# execute the UI test suite
59+
./x.py test src/test/ui
6060
61-
# execute only some tests in the run-pass test suite
62-
./x.py test src/test/run-pass --test-args substring-of-test-name
61+
# execute only some tests in the UI test suite
62+
./x.py test src/test/ui --test-args substring-of-test-name
6363
6464
# execute tests in the standard library in stage0
6565
./x.py test --stage 0 src/libstd
@@ -215,7 +215,7 @@ build/
215215

216216
# Output for all compiletest-based test suites
217217
test/
218-
run-pass/
218+
ui/
219219
compile-fail/
220220
debuginfo/
221221
...

Diff for: src/bootstrap/builder.rs

-3
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ impl<'a> Builder<'a> {
371371
Kind::Test => describe!(
372372
test::Tidy,
373373
test::Ui,
374-
test::RunPass,
375374
test::CompileFail,
376375
test::RunFail,
377376
test::RunPassValgrind,
@@ -382,10 +381,8 @@ impl<'a> Builder<'a> {
382381
test::Incremental,
383382
test::Debuginfo,
384383
test::UiFullDeps,
385-
test::RunPassFullDeps,
386384
test::Rustdoc,
387385
test::Pretty,
388-
test::RunPassPretty,
389386
test::RunFailPretty,
390387
test::RunPassValgrindPretty,
391388
test::Crate,

Diff for: src/bootstrap/builder/tests.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,6 @@ fn test_with_no_doc_stage0() {
629629
fn test_exclude() {
630630
let mut config = configure(&[], &[]);
631631
config.exclude = vec![
632-
"src/test/run-pass".into(),
633632
"src/tools/tidy".into(),
634633
];
635634
config.cmd = Subcommand::Test {
@@ -648,11 +647,9 @@ fn test_exclude() {
648647
let builder = Builder::new(&build);
649648
builder.run_step_descriptions(&Builder::get_step_descriptions(Kind::Test), &[]);
650649

651-
// Ensure we have really excluded run-pass & tidy
652-
assert!(!builder.cache.contains::<test::RunPass>());
650+
// Ensure we have really excluded tidy
653651
assert!(!builder.cache.contains::<test::Tidy>());
654652

655653
// Ensure other tests are not affected.
656-
assert!(builder.cache.contains::<test::RunPassFullDeps>());
657654
assert!(builder.cache.contains::<test::RustdocUi>());
658655
}

Diff for: src/bootstrap/flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ Arguments:
330330
This subcommand accepts a number of paths to directories to tests that
331331
should be compiled and run. For example:
332332
333-
./x.py test src/test/run-pass
333+
./x.py test src/test/ui
334334
./x.py test src/libstd --test-args hash_map
335335
./x.py test src/libstd --stage 0 --no-doc
336336
./x.py test src/test/ui --bless

Diff for: src/bootstrap/mk/Makefile.in

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ check:
4848
$(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS)
4949
check-aux:
5050
$(Q)$(BOOTSTRAP) test \
51-
src/test/run-pass/pretty \
5251
src/test/run-fail/pretty \
5352
src/test/run-pass-valgrind/pretty \
54-
src/test/run-pass-fulldeps/pretty \
5553
$(AUX_ARGS) \
5654
$(BOOTSTRAP_ARGS)
5755
check-bootstrap:
@@ -75,9 +73,7 @@ check-stage2-T-x86_64-unknown-linux-musl-H-x86_64-unknown-linux-gnu:
7573

7674
TESTS_IN_2 := \
7775
src/test/ui \
78-
src/test/run-pass \
7976
src/test/compile-fail \
80-
src/test/run-pass-fulldeps \
8177
src/tools/linkchecker
8278

8379
ci-subset-1:

Diff for: src/bootstrap/native.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl Step for TestHelpers {
547547
}
548548

549549
/// Compiles the `rust_test_helpers.c` library which we used in various
550-
/// `run-pass` test suites for ABI testing.
550+
/// `run-pass` tests for ABI testing.
551551
fn run(self, builder: &Builder<'_>) {
552552
if builder.config.dry_run {
553553
return;

Diff for: src/bootstrap/test.rs

-20
Original file line numberDiff line numberDiff line change
@@ -820,13 +820,6 @@ default_test_with_compare_mode!(Ui {
820820
compare_mode: "nll"
821821
});
822822

823-
default_test_with_compare_mode!(RunPass {
824-
path: "src/test/run-pass",
825-
mode: "run-pass",
826-
suite: "run-pass",
827-
compare_mode: "nll"
828-
});
829-
830823
default_test!(CompileFail {
831824
path: "src/test/compile-fail",
832825
mode: "compile-fail",
@@ -881,12 +874,6 @@ host_test!(UiFullDeps {
881874
suite: "ui-fulldeps"
882875
});
883876

884-
host_test!(RunPassFullDeps {
885-
path: "src/test/run-pass-fulldeps",
886-
mode: "run-pass",
887-
suite: "run-pass-fulldeps"
888-
});
889-
890877
host_test!(Rustdoc {
891878
path: "src/test/rustdoc",
892879
mode: "rustdoc",
@@ -898,13 +885,6 @@ host_test!(Pretty {
898885
mode: "pretty",
899886
suite: "pretty"
900887
});
901-
test!(RunPassPretty {
902-
path: "src/test/run-pass/pretty",
903-
mode: "pretty",
904-
suite: "run-pass",
905-
default: false,
906-
host: true
907-
});
908888
test!(RunFailPretty {
909889
path: "src/test/run-fail/pretty",
910890
mode: "pretty",

Diff for: src/ci/docker/asmjs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ENV TARGETS=asmjs-unknown-emscripten
3232
ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests
3333

3434
ENV SCRIPT python2.7 ../x.py test --target $TARGETS \
35-
src/test/run-pass \
35+
src/test/ui \
3636
src/test/run-fail \
3737
src/libstd \
3838
src/liballoc \

Diff for: src/ci/docker/test-various/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ ENV WASM_TARGETS=wasm32-unknown-unknown
4343
ENV WASM_SCRIPT python2.7 /checkout/x.py test --target $WASM_TARGETS \
4444
src/test/run-make \
4545
src/test/ui \
46-
src/test/run-pass \
4746
src/test/compile-fail \
4847
src/test/mir-opt \
4948
src/test/codegen-units \

Diff for: src/doc/unstable-book/src/language-features/plugin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ code that manipulates syntax trees at
4444
compile time.
4545

4646
Let's write a plugin
47-
[`roman_numerals.rs`](https://github.com/rust-lang/rust/blob/master/src/test/run-pass-fulldeps/auxiliary/roman_numerals.rs)
47+
[`roman_numerals.rs`](https://github.com/rust-lang/rust/blob/master/src/test/ui-fulldeps/auxiliary/roman_numerals.rs)
4848
that implements Roman numeral integer literals.
4949

5050
```rust,ignore

Diff for: src/libcore/fmt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2172,5 +2172,5 @@ impl<T: ?Sized + Debug> Debug for UnsafeCell<T> {
21722172
}
21732173
}
21742174

2175-
// If you expected tests to be here, look instead at the run-pass/ifmt.rs test,
2175+
// If you expected tests to be here, look instead at the ui/ifmt.rs test,
21762176
// it's a lot easier than creating all of the rt::Piece structures here.

Diff for: src/librustc_ast_borrowck/borrowck/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ However, it is not always unsafe to freeze the base pointer. In
747747
particular, if the referent is frozen, there is no harm in it:
748748

749749
```rust
750-
// src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs
750+
// src/test/ui/borrowck-borrow-of-mut-base-ptr-safe.rs
751751
fn foo<'a>(mut t0: &'a mut i32,
752752
mut t1: &'a mut i32) {
753753
let p: &i32 = &*t0; // Freezes `*t0`
@@ -763,7 +763,7 @@ already frozen. In particular, we cannot assign to `*t0` through the
763763
new alias `t2`, as demonstrated in this test case:
764764

765765
```rust
766-
// src/test/run-pass/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs
766+
// src/test/ui/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs
767767
fn foo(t0: & &mut i32) {
768768
let t1 = t0;
769769
let p: &i32 = &**t0;

Diff for: src/librustc_typeck/check/_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
8888
// For each ampersand peeled off, update the binding mode and push the original
8989
// type into the adjustments vector.
9090
//
91-
// See the examples in `run-pass/match-defbm*.rs`.
91+
// See the examples in `ui/match-defbm*.rs`.
9292
let mut pat_adjustments = vec![];
9393
while let ty::Ref(_, inner_ty, inner_mutability) = exp_ty.sty {
9494
debug!("inspecting {:?}", exp_ty);

Diff for: src/librustc_typeck/check/coercion.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! useful for freezing mut/const things (that is, when the expected is &T
1414
//! but you have &const T or &mut T) and also for avoiding the linearity
1515
//! of mut things (when the expected is &mut T and you have &mut T). See
16-
//! the various `src/test/run-pass/coerce-reborrow-*.rs` tests for
16+
//! the various `src/test/ui/coerce-reborrow-*.rs` tests for
1717
//! examples of where this is useful.
1818
//!
1919
//! ## Subtle note
@@ -346,7 +346,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
346346
// too strong. Consider a coercion from `&'a &'x Rc<T>` to
347347
// `&'b T`. In this case, `'a` is actually irrelevant.
348348
// The pointer we want is `LUB('x, 'b`). If we choose `LUB('a,'b)`
349-
// we get spurious errors (`run-pass/regions-lub-ref-ref-rc.rs`).
349+
// we get spurious errors (`ui/regions-lub-ref-ref-rc.rs`).
350350
// (The errors actually show up in borrowck, typically, because
351351
// this extra edge causes the region `'a` to be inferred to something
352352
// too big, which then results in borrowck errors.)

Diff for: src/librustc_typeck/check/method/probe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
13941394
/// probe. This will result in a pending obligation so when more type-info is available we can
13951395
/// make the final decision.
13961396
///
1397-
/// Example (`src/test/run-pass/method-two-trait-defer-resolution-1.rs`):
1397+
/// Example (`src/test/ui/method-two-trait-defer-resolution-1.rs`):
13981398
///
13991399
/// ```
14001400
/// trait Foo { ... }

Diff for: src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<'a, 'tcx> Expectation<'tcx> {
312312
/// It is only the `&[1, 2, 3]` expression as a whole that can be coerced
313313
/// to the type `&[isize]`. Therefore, we propagate this more limited hint,
314314
/// which still is useful, because it informs integer literals and the like.
315-
/// See the test case `test/run-pass/coerce-expect-unsized.rs` and #20169
315+
/// See the test case `test/ui/coerce-expect-unsized.rs` and #20169
316316
/// for examples of where this comes up,.
317317
fn rvalue_hint(fcx: &FnCtxt<'a, 'tcx>, ty: Ty<'tcx>) -> Expectation<'tcx> {
318318
match fcx.tcx.struct_tail_without_normalization(ty).sty {

Diff for: src/libstd/thread/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,6 @@ mod tests {
17421742
assert!(thread::current().id() != spawned_id);
17431743
}
17441744

1745-
// NOTE: the corresponding test for stderr is in run-pass/thread-stderr, due
1745+
// NOTE: the corresponding test for stderr is in ui/thread-stderr, due
17461746
// to the test harness apparently interfering with stderr configuration.
17471747
}

Diff for: src/libsyntax/ext/tt/macro_check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ fn check_binders(
238238
match *lhs {
239239
TokenTree::Token(..) => {}
240240
// This can only happen when checking a nested macro because this LHS is then in the RHS of
241-
// the outer macro. See run-pass/macros/macro-of-higher-order.rs where $y:$fragment in the
241+
// the outer macro. See ui/macros/macro-of-higher-order.rs where $y:$fragment in the
242242
// LHS of the nested macro (and RHS of the outer macro) is parsed as MetaVar(y) Colon
243243
// MetaVar(fragment) and not as MetaVarDecl(y, fragment).
244244
TokenTree::MetaVar(span, name) => {

Diff for: src/libsyntax_pos/hygiene.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ impl HygieneData {
305305
// was defined at its invocation (i.e., inside the macros 2.0 definition)
306306
// so that the macros 2.0 definition remains hygienic.
307307
//
308-
// See the example at `test/run-pass/hygiene/legacy_interaction.rs`.
308+
// See the example at `test/ui/hygiene/legacy_interaction.rs`.
309309
for (expn_id, transparency) in self.marks(ctxt) {
310310
call_site_ctxt = self.apply_mark_internal(call_site_ctxt, expn_id, transparency);
311311
}

Diff for: src/test/run-pass/.gitattributes

-1
This file was deleted.

Diff for: src/test/run-pass/auxiliary/weak-lang-items.rs

-22
This file was deleted.

Diff for: src/test/run-pass/coherence/auxiliary/coherence_copy_like_lib.rs

-10
This file was deleted.

Diff for: src/test/run-pass/coherence/auxiliary/coherence_lib.rs

-15
This file was deleted.

Diff for: src/test/run-pass/consts/auxiliary/const_fn_lib.rs

-5
This file was deleted.

Diff for: src/test/run-pass/if-ret.stderr

-8
This file was deleted.

Diff for: src/test/run-pass/macros/auxiliary/macro_crate_nonterminal.rs

-12
This file was deleted.

Diff for: src/test/run-pass/macros/auxiliary/unstable-macros.rs

-6
This file was deleted.

Diff for: src/test/run-pass/macros/macro-use-all-and-none.stderr

-8
This file was deleted.

Diff for: src/test/run-pass/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs

-1
This file was deleted.

0 commit comments

Comments
 (0)