Skip to content

Commit

Permalink
Auto merge of rust-lang#63029 - petrochenkov:rpass, r=Centril
Browse files Browse the repository at this point in the history
Move run-pass tests to ui

This is the second attempt at doing rust-lang#53994 (which was previously reverted in rust-lang#54530).

The issue with inability to run the test suite in a faster way (rust-lang#54047) that motivated the revert was recently addressed by rust-lang#61755.

r? @Centril
  • Loading branch information
bors committed Jul 27, 2019
2 parents a5e7bb3 + f1c8673 commit c798dff
Show file tree
Hide file tree
Showing 3,336 changed files with 1,175 additions and 324 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions src/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ The script accepts commands, flags, and arguments to determine what to do:
# run all unit tests
./x.py test
# execute the run-pass test suite
./x.py test src/test/run-pass
# execute the UI test suite
./x.py test src/test/ui
# execute only some tests in the run-pass test suite
./x.py test src/test/run-pass --test-args substring-of-test-name
# execute only some tests in the UI test suite
./x.py test src/test/ui --test-args substring-of-test-name
# execute tests in the standard library in stage0
./x.py test --stage 0 src/libstd
Expand Down Expand Up @@ -215,7 +215,7 @@ build/

# Output for all compiletest-based test suites
test/
run-pass/
ui/
compile-fail/
debuginfo/
...
Expand Down
3 changes: 0 additions & 3 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ impl<'a> Builder<'a> {
Kind::Test => describe!(
test::Tidy,
test::Ui,
test::RunPass,
test::CompileFail,
test::RunFail,
test::RunPassValgrind,
Expand All @@ -382,10 +381,8 @@ impl<'a> Builder<'a> {
test::Incremental,
test::Debuginfo,
test::UiFullDeps,
test::RunPassFullDeps,
test::Rustdoc,
test::Pretty,
test::RunPassPretty,
test::RunFailPretty,
test::RunPassValgrindPretty,
test::Crate,
Expand Down
5 changes: 1 addition & 4 deletions src/bootstrap/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ fn test_with_no_doc_stage0() {
fn test_exclude() {
let mut config = configure(&[], &[]);
config.exclude = vec![
"src/test/run-pass".into(),
"src/tools/tidy".into(),
];
config.cmd = Subcommand::Test {
Expand All @@ -648,11 +647,9 @@ fn test_exclude() {
let builder = Builder::new(&build);
builder.run_step_descriptions(&Builder::get_step_descriptions(Kind::Test), &[]);

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

// Ensure other tests are not affected.
assert!(builder.cache.contains::<test::RunPassFullDeps>());
assert!(builder.cache.contains::<test::RustdocUi>());
}
2 changes: 1 addition & 1 deletion src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Arguments:
This subcommand accepts a number of paths to directories to tests that
should be compiled and run. For example:
./x.py test src/test/run-pass
./x.py test src/test/ui
./x.py test src/libstd --test-args hash_map
./x.py test src/libstd --stage 0 --no-doc
./x.py test src/test/ui --bless
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/mk/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ check:
$(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS)
check-aux:
$(Q)$(BOOTSTRAP) test \
src/test/run-pass/pretty \
src/test/run-fail/pretty \
src/test/run-pass-valgrind/pretty \
src/test/run-pass-fulldeps/pretty \
$(AUX_ARGS) \
$(BOOTSTRAP_ARGS)
check-bootstrap:
Expand All @@ -75,9 +73,7 @@ check-stage2-T-x86_64-unknown-linux-musl-H-x86_64-unknown-linux-gnu:

TESTS_IN_2 := \
src/test/ui \
src/test/run-pass \
src/test/compile-fail \
src/test/run-pass-fulldeps \
src/tools/linkchecker

ci-subset-1:
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ impl Step for TestHelpers {
}

/// Compiles the `rust_test_helpers.c` library which we used in various
/// `run-pass` test suites for ABI testing.
/// `run-pass` tests for ABI testing.
fn run(self, builder: &Builder<'_>) {
if builder.config.dry_run {
return;
Expand Down
20 changes: 0 additions & 20 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,13 +820,6 @@ default_test_with_compare_mode!(Ui {
compare_mode: "nll"
});

default_test_with_compare_mode!(RunPass {
path: "src/test/run-pass",
mode: "run-pass",
suite: "run-pass",
compare_mode: "nll"
});

default_test!(CompileFail {
path: "src/test/compile-fail",
mode: "compile-fail",
Expand Down Expand Up @@ -881,12 +874,6 @@ host_test!(UiFullDeps {
suite: "ui-fulldeps"
});

host_test!(RunPassFullDeps {
path: "src/test/run-pass-fulldeps",
mode: "run-pass",
suite: "run-pass-fulldeps"
});

host_test!(Rustdoc {
path: "src/test/rustdoc",
mode: "rustdoc",
Expand All @@ -898,13 +885,6 @@ host_test!(Pretty {
mode: "pretty",
suite: "pretty"
});
test!(RunPassPretty {
path: "src/test/run-pass/pretty",
mode: "pretty",
suite: "run-pass",
default: false,
host: true
});
test!(RunFailPretty {
path: "src/test/run-fail/pretty",
mode: "pretty",
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/asmjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ENV TARGETS=asmjs-unknown-emscripten
ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests

ENV SCRIPT python2.7 ../x.py test --target $TARGETS \
src/test/run-pass \
src/test/ui \
src/test/run-fail \
src/libstd \
src/liballoc \
Expand Down
1 change: 0 additions & 1 deletion src/ci/docker/test-various/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ ENV WASM_TARGETS=wasm32-unknown-unknown
ENV WASM_SCRIPT python2.7 /checkout/x.py test --target $WASM_TARGETS \
src/test/run-make \
src/test/ui \
src/test/run-pass \
src/test/compile-fail \
src/test/mir-opt \
src/test/codegen-units \
Expand Down
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/language-features/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ code that manipulates syntax trees at
compile time.

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

```rust,ignore
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,5 +2172,5 @@ impl<T: ?Sized + Debug> Debug for UnsafeCell<T> {
}
}

// If you expected tests to be here, look instead at the run-pass/ifmt.rs test,
// If you expected tests to be here, look instead at the ui/ifmt.rs test,
// it's a lot easier than creating all of the rt::Piece structures here.
4 changes: 2 additions & 2 deletions src/librustc_ast_borrowck/borrowck/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ However, it is not always unsafe to freeze the base pointer. In
particular, if the referent is frozen, there is no harm in it:

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

```rust
// src/test/run-pass/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs
// src/test/ui/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs
fn foo(t0: & &mut i32) {
let t1 = t0;
let p: &i32 = &**t0;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// For each ampersand peeled off, update the binding mode and push the original
// type into the adjustments vector.
//
// See the examples in `run-pass/match-defbm*.rs`.
// See the examples in `ui/match-defbm*.rs`.
let mut pat_adjustments = vec![];
while let ty::Ref(_, inner_ty, inner_mutability) = exp_ty.sty {
debug!("inspecting {:?}", exp_ty);
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! useful for freezing mut/const things (that is, when the expected is &T
//! but you have &const T or &mut T) and also for avoiding the linearity
//! of mut things (when the expected is &mut T and you have &mut T). See
//! the various `src/test/run-pass/coerce-reborrow-*.rs` tests for
//! the various `src/test/ui/coerce-reborrow-*.rs` tests for
//! examples of where this is useful.
//!
//! ## Subtle note
Expand Down Expand Up @@ -346,7 +346,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
// too strong. Consider a coercion from `&'a &'x Rc<T>` to
// `&'b T`. In this case, `'a` is actually irrelevant.
// The pointer we want is `LUB('x, 'b`). If we choose `LUB('a,'b)`
// we get spurious errors (`run-pass/regions-lub-ref-ref-rc.rs`).
// we get spurious errors (`ui/regions-lub-ref-ref-rc.rs`).
// (The errors actually show up in borrowck, typically, because
// this extra edge causes the region `'a` to be inferred to something
// too big, which then results in borrowck errors.)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
/// probe. This will result in a pending obligation so when more type-info is available we can
/// make the final decision.
///
/// Example (`src/test/run-pass/method-two-trait-defer-resolution-1.rs`):
/// Example (`src/test/ui/method-two-trait-defer-resolution-1.rs`):
///
/// ```
/// trait Foo { ... }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl<'a, 'tcx> Expectation<'tcx> {
/// It is only the `&[1, 2, 3]` expression as a whole that can be coerced
/// to the type `&[isize]`. Therefore, we propagate this more limited hint,
/// which still is useful, because it informs integer literals and the like.
/// See the test case `test/run-pass/coerce-expect-unsized.rs` and #20169
/// See the test case `test/ui/coerce-expect-unsized.rs` and #20169
/// for examples of where this comes up,.
fn rvalue_hint(fcx: &FnCtxt<'a, 'tcx>, ty: Ty<'tcx>) -> Expectation<'tcx> {
match fcx.tcx.struct_tail_without_normalization(ty).sty {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,6 @@ mod tests {
assert!(thread::current().id() != spawned_id);
}

// NOTE: the corresponding test for stderr is in run-pass/thread-stderr, due
// NOTE: the corresponding test for stderr is in ui/thread-stderr, due
// to the test harness apparently interfering with stderr configuration.
}
2 changes: 1 addition & 1 deletion src/libsyntax/ext/tt/macro_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ fn check_binders(
match *lhs {
TokenTree::Token(..) => {}
// This can only happen when checking a nested macro because this LHS is then in the RHS of
// the outer macro. See run-pass/macros/macro-of-higher-order.rs where $y:$fragment in the
// the outer macro. See ui/macros/macro-of-higher-order.rs where $y:$fragment in the
// LHS of the nested macro (and RHS of the outer macro) is parsed as MetaVar(y) Colon
// MetaVar(fragment) and not as MetaVarDecl(y, fragment).
TokenTree::MetaVar(span, name) => {
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax_pos/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ impl HygieneData {
// was defined at its invocation (i.e., inside the macros 2.0 definition)
// so that the macros 2.0 definition remains hygienic.
//
// See the example at `test/run-pass/hygiene/legacy_interaction.rs`.
// See the example at `test/ui/hygiene/legacy_interaction.rs`.
for (expn_id, transparency) in self.marks(ctxt) {
call_site_ctxt = self.apply_mark_internal(call_site_ctxt, expn_id, transparency);
}
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/.gitattributes

This file was deleted.

22 changes: 0 additions & 22 deletions src/test/run-pass/auxiliary/weak-lang-items.rs

This file was deleted.

10 changes: 0 additions & 10 deletions src/test/run-pass/coherence/auxiliary/coherence_copy_like_lib.rs

This file was deleted.

15 changes: 0 additions & 15 deletions src/test/run-pass/coherence/auxiliary/coherence_lib.rs

This file was deleted.

5 changes: 0 additions & 5 deletions src/test/run-pass/consts/auxiliary/const_fn_lib.rs

This file was deleted.

8 changes: 0 additions & 8 deletions src/test/run-pass/if-ret.stderr

This file was deleted.

12 changes: 0 additions & 12 deletions src/test/run-pass/macros/auxiliary/macro_crate_nonterminal.rs

This file was deleted.

6 changes: 0 additions & 6 deletions src/test/run-pass/macros/auxiliary/unstable-macros.rs

This file was deleted.

8 changes: 0 additions & 8 deletions src/test/run-pass/macros/macro-use-all-and-none.stderr

This file was deleted.

This file was deleted.

Loading

0 comments on commit c798dff

Please sign in to comment.