From 9d988e8be8f5e14c0e1fd03a6cb03ab01e33fc3e Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 19 Jul 2019 13:42:04 +0300 Subject: [PATCH 1/2] tests: Require run-pass tests without annotations to run successfully again --- src/tools/compiletest/src/runtest.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 66fbe3c7037a7..c471009694802 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -318,8 +318,10 @@ impl<'test> TestCx<'test> { } fn should_run_successfully(&self) -> bool { + let pass_mode = self.pass_mode(); match self.config.mode { - RunPass | Ui => self.pass_mode() == Some(PassMode::Run), + Ui => pass_mode == Some(PassMode::Run), + RunPass => pass_mode == Some(PassMode::Run) || pass_mode.is_none(), mode => panic!("unimplemented for mode {:?}", mode), } } From b5af9471d8c24ff324eef5b0828a5dcf45300641 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 19 Jul 2019 14:03:22 +0300 Subject: [PATCH 2/2] Fix or ignore regressed tests --- src/test/run-pass/backtrace-debuginfo.rs | 1 + src/test/run-pass/command-uid-gid.rs | 5 +++++ src/test/run-pass/generator/size-moved-locals.rs | 1 + .../issues}/issue-58375-monomorphize-default-impls.rs | 5 +++-- 4 files changed, 10 insertions(+), 2 deletions(-) rename src/test/{run-pass => ui/issues}/issue-58375-monomorphize-default-impls.rs (85%) diff --git a/src/test/run-pass/backtrace-debuginfo.rs b/src/test/run-pass/backtrace-debuginfo.rs index 69ce1f70322ab..4d093fdf046e0 100644 --- a/src/test/run-pass/backtrace-debuginfo.rs +++ b/src/test/run-pass/backtrace-debuginfo.rs @@ -12,6 +12,7 @@ // ignore-emscripten spawning processes is not supported // normalize-stderr-test ".*\n" -> "" // ignore-sgx no processes +// ignore-msvc issue #62844 // Note that above `-opt-bisect-limit=0` is used to basically disable // optimizations. It creates tons of output on stderr, hence we normalize diff --git a/src/test/run-pass/command-uid-gid.rs b/src/test/run-pass/command-uid-gid.rs index 2b52c5d104c24..5f4b3941d90e3 100644 --- a/src/test/run-pass/command-uid-gid.rs +++ b/src/test/run-pass/command-uid-gid.rs @@ -1,3 +1,8 @@ +// ignore-android +// ignore-cloudabi +// ignore-emscripten +// ignore-sgx + #![feature(rustc_private)] fn main() { diff --git a/src/test/run-pass/generator/size-moved-locals.rs b/src/test/run-pass/generator/size-moved-locals.rs index 37e2e0cfdcccf..a15a39118a028 100644 --- a/src/test/run-pass/generator/size-moved-locals.rs +++ b/src/test/run-pass/generator/size-moved-locals.rs @@ -9,6 +9,7 @@ // See issue #59123 for a full explanation. // edition:2018 +// ignore-wasm32 #![feature(generators, generator_trait)] diff --git a/src/test/run-pass/issue-58375-monomorphize-default-impls.rs b/src/test/ui/issues/issue-58375-monomorphize-default-impls.rs similarity index 85% rename from src/test/run-pass/issue-58375-monomorphize-default-impls.rs rename to src/test/ui/issues/issue-58375-monomorphize-default-impls.rs index 6730217626f3e..6da6f398dfcc6 100644 --- a/src/test/run-pass/issue-58375-monomorphize-default-impls.rs +++ b/src/test/ui/issues/issue-58375-monomorphize-default-impls.rs @@ -1,6 +1,8 @@ // Make sure that the mono-item collector does not crash when trying to // instantiate a default impl for DecodeUtf16<::Item> // See https://github.com/rust-lang/rust/issues/58375 + +// build-pass // compile-flags:-C link-dead-code #![crate_type = "rlib"] @@ -19,5 +21,4 @@ impl A for u8 { type Item = char; } -impl Arbitrary for DecodeUtf16<::Item> { -} +impl Arbitrary for DecodeUtf16<::Item> {}