-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
If we try to run a test binary built with -Z panic-abort-tests
and that test has a function with the #[bench]
attribute, the binary will panic with the following error:
thread 'main' panicked at 'Cannot run dynamic test fn out-of-process', library/test/src/lib.rs:549:22
This is because we convert #[bench]
to a test using DynTestFn
when not running benchmarks, but DynTestFn
is not supported with -Z panic-abort-tests
, because we must run tests out of process and don't have a way to pass a closure to another process.
Metadata
Metadata
Assignees
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.