From 8722427a30807debd515607114d549329ca8002e Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 21 Jan 2025 14:36:33 +0100 Subject: [PATCH] make UI tests that use `--test` work on panic=abort targets using a second revision that also passes `-Zpanic_abort_test` the first revision, which does not use the `-Z` flag, is configured to only run on targets that support unwinding fixes #135819 --- ...with-custom-errors-does-not-create-unnecessary-code.rs | 8 +++++++- .../feature-gate-generic_assert.rs | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs index 37d94830db2cf..e76f6d1d2ba0a 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs @@ -1,4 +1,10 @@ -//@ compile-flags: --test +//@ revisions: can_unwind +//@ [can_unwind] compile-flags: --test +//@ [can_unwind] needs-unwind +// +//@ revisions: cannot_unwind +//@ [cannot_unwind] compile-flags: --test -Zpanic_abort_tests +// //@ run-pass #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs index 86cc7adb90de6..e3850ce446dbe 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs @@ -1,4 +1,10 @@ -//@ compile-flags: --test +//@ revisions: can_unwind +//@ [can_unwind] compile-flags: --test +//@ [can_unwind] needs-unwind +// +//@ revisions: cannot_unwind +//@ [cannot_unwind] compile-flags: --test -Zpanic_abort_tests +// // ignore-tidy-linelength //@ run-pass