Remove run-pass test suites
This commit is contained in:
parent
5486cc69bd
commit
42a317a1cd
@ -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
|
||||
@ -215,7 +215,7 @@ build/
|
||||
|
||||
# Output for all compiletest-based test suites
|
||||
test/
|
||||
run-pass/
|
||||
ui/
|
||||
compile-fail/
|
||||
debuginfo/
|
||||
...
|
||||
|
@ -371,7 +371,6 @@ impl<'a> Builder<'a> {
|
||||
Kind::Test => describe!(
|
||||
test::Tidy,
|
||||
test::Ui,
|
||||
test::RunPass,
|
||||
test::CompileFail,
|
||||
test::RunFail,
|
||||
test::RunPassValgrind,
|
||||
@ -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,
|
||||
|
@ -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 {
|
||||
@ -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>());
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
@ -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",
|
||||
@ -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",
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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`
|
||||
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
@ -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.)
|
||||
|
@ -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 { ... }
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
}
|
||||
|
@ -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) => {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ use crate::util::PathBufExt;
|
||||
pub enum Mode {
|
||||
CompileFail,
|
||||
RunFail,
|
||||
/// This now behaves like a `ui` test that has an implict `// run-pass`.
|
||||
RunPass,
|
||||
RunPassValgrind,
|
||||
Pretty,
|
||||
DebugInfoCdb,
|
||||
@ -33,7 +31,7 @@ pub enum Mode {
|
||||
|
||||
impl Mode {
|
||||
pub fn disambiguator(self) -> &'static str {
|
||||
// Run-pass and pretty run-pass tests could run concurrently, and if they do,
|
||||
// Pretty-printing tests could run concurrently, and if they do,
|
||||
// they need to keep their output segregated. Same is true for debuginfo tests that
|
||||
// can be run on cdb, gdb, and lldb.
|
||||
match self {
|
||||
@ -52,7 +50,6 @@ impl FromStr for Mode {
|
||||
match s {
|
||||
"compile-fail" => Ok(CompileFail),
|
||||
"run-fail" => Ok(RunFail),
|
||||
"run-pass" => Ok(RunPass),
|
||||
"run-pass-valgrind" => Ok(RunPassValgrind),
|
||||
"pretty" => Ok(Pretty),
|
||||
"debuginfo-cdb" => Ok(DebugInfoCdb),
|
||||
@ -78,7 +75,6 @@ impl fmt::Display for Mode {
|
||||
let s = match *self {
|
||||
CompileFail => "compile-fail",
|
||||
RunFail => "run-fail",
|
||||
RunPass => "run-pass",
|
||||
RunPassValgrind => "run-pass-valgrind",
|
||||
Pretty => "pretty",
|
||||
DebugInfoCdb => "debuginfo-cdb",
|
||||
@ -202,7 +198,7 @@ pub struct Config {
|
||||
/// The name of the stage being built (stage1, etc)
|
||||
pub stage_id: String,
|
||||
|
||||
/// The test mode, compile-fail, run-fail, run-pass
|
||||
/// The test mode, compile-fail, run-fail, ui
|
||||
pub mode: Mode,
|
||||
|
||||
/// Run ignored tests
|
||||
|
@ -592,7 +592,7 @@ impl TestProps {
|
||||
check_no_run("build-pass");
|
||||
Some(PassMode::Build)
|
||||
} else if config.parse_name_directive(ln, "run-pass") {
|
||||
if config.mode != Mode::Ui && config.mode != Mode::RunPass /* compatibility */ {
|
||||
if config.mode != Mode::Ui {
|
||||
panic!("`run-pass` header is only supported in UI tests")
|
||||
}
|
||||
Some(PassMode::Run)
|
||||
|
@ -125,8 +125,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
|
||||
"",
|
||||
"mode",
|
||||
"which sort of compile tests to run",
|
||||
"(compile-fail|run-fail|run-pass|\
|
||||
run-pass-valgrind|pretty|debug-info|incremental|mir-opt)",
|
||||
"(compile-fail|run-fail|run-pass-valgrind|pretty|debug-info|incremental|mir-opt)",
|
||||
)
|
||||
.optopt(
|
||||
"",
|
||||
@ -814,7 +813,7 @@ fn make_test_name(
|
||||
) -> test::TestName {
|
||||
// Convert a complete path to something like
|
||||
//
|
||||
// run-pass/foo/bar/baz.rs
|
||||
// ui/foo/bar/baz.rs
|
||||
let path = PathBuf::from(config.src_base.file_name().unwrap())
|
||||
.join(&testpaths.relative_dir)
|
||||
.join(&testpaths.file.file_name().unwrap());
|
||||
|
@ -5,7 +5,7 @@ use crate::common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI
|
||||
use crate::common::{output_base_dir, output_base_name, output_testname_unique};
|
||||
use crate::common::{Codegen, CodegenUnits, Rustdoc};
|
||||
use crate::common::{DebugInfoCdb, DebugInfoGdbLldb, DebugInfoGdb, DebugInfoLldb};
|
||||
use crate::common::{CompileFail, Pretty, RunFail, RunPass, RunPassValgrind};
|
||||
use crate::common::{CompileFail, Pretty, RunFail, RunPassValgrind};
|
||||
use crate::common::{Config, TestPaths};
|
||||
use crate::common::{Incremental, MirOpt, RunMake, Ui, JsDocTest, Assembly};
|
||||
use diff;
|
||||
@ -260,7 +260,7 @@ pub fn compute_stamp_hash(config: &Config) -> String {
|
||||
env::var_os("PYTHONPATH").hash(&mut hash);
|
||||
}
|
||||
|
||||
if let Ui | RunPass | Incremental | Pretty = config.mode {
|
||||
if let Ui | Incremental | Pretty = config.mode {
|
||||
config.force_pass_mode.hash(&mut hash);
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ impl<'test> TestCx<'test> {
|
||||
CodegenUnits => self.run_codegen_units_test(),
|
||||
Incremental => self.run_incremental_test(),
|
||||
RunMake => self.run_rmake_test(),
|
||||
RunPass | Ui => self.run_ui_test(),
|
||||
Ui => self.run_ui_test(),
|
||||
MirOpt => self.run_mir_opt_test(),
|
||||
Assembly => self.run_assembly_test(),
|
||||
JsDocTest => self.run_js_doc_test(),
|
||||
@ -321,7 +321,6 @@ impl<'test> TestCx<'test> {
|
||||
let pass_mode = self.pass_mode();
|
||||
match self.config.mode {
|
||||
Ui => pass_mode == Some(PassMode::Run),
|
||||
RunPass => pass_mode == Some(PassMode::Run) || pass_mode.is_none(),
|
||||
mode => panic!("unimplemented for mode {:?}", mode),
|
||||
}
|
||||
}
|
||||
@ -329,7 +328,6 @@ impl<'test> TestCx<'test> {
|
||||
fn should_compile_successfully(&self) -> bool {
|
||||
match self.config.mode {
|
||||
CompileFail => false,
|
||||
RunPass => true,
|
||||
JsDocTest => true,
|
||||
Ui => self.pass_mode().is_some(),
|
||||
Incremental => {
|
||||
@ -1527,7 +1525,7 @@ impl<'test> TestCx<'test> {
|
||||
fn compile_test(&self) -> ProcRes {
|
||||
// Only use `make_exe_name` when the test ends up being executed.
|
||||
let will_execute = match self.config.mode {
|
||||
RunPass | Ui => self.should_run_successfully(),
|
||||
Ui => self.should_run_successfully(),
|
||||
Incremental => self.revision.unwrap().starts_with("r"),
|
||||
RunFail | RunPassValgrind | MirOpt |
|
||||
DebugInfoCdb | DebugInfoGdbLldb | DebugInfoGdb | DebugInfoLldb => true,
|
||||
@ -1958,7 +1956,7 @@ impl<'test> TestCx<'test> {
|
||||
rustc.arg("-Zui-testing");
|
||||
}
|
||||
}
|
||||
RunPass | Ui => {
|
||||
Ui => {
|
||||
if !self
|
||||
.props
|
||||
.compile_flags
|
||||
@ -2091,7 +2089,7 @@ impl<'test> TestCx<'test> {
|
||||
}
|
||||
|
||||
let src = self.config.src_base
|
||||
.parent().unwrap() // chop off `run-pass`
|
||||
.parent().unwrap() // chop off `ui`
|
||||
.parent().unwrap() // chop off `test`
|
||||
.parent().unwrap(); // chop off `src`
|
||||
args.push(src.join("src/etc/wasm32-shim.js").display().to_string());
|
||||
|
Loading…
Reference in New Issue
Block a user