]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #103681 - RalfJung:libtest-thread, r=thomcc
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 4 Nov 2022 17:52:26 +0000 (18:52 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2022 17:52:26 +0000 (18:52 +0100)
commitc38ee06b62af10924259525c652ef29a70e98e08
treed4419eb1cc6ae81a661c96713ae5ad6006472a74
parent612bb7890cbac06e9f6b65ac15aeeb174d4ccb23
parent3af058ec947b91590fe3ffd47a9bb2d690d2cb9d
Rollup merge of #103681 - RalfJung:libtest-thread, r=thomcc

libtest: run all tests in their own thread, if supported by the host

This reverts the threading changes of https://github.com/rust-lang/rust/pull/56243, which made it so that with `-j1`, the test harness does not spawn any threads. Those changes were done to enable Miri to run the test harness, but Miri supports threads nowadays, so this is no longer needed. Using a thread for each test is useful because the thread's name can be set to the test's name which makes panic messages consistent between `-j1` and `-j2` runs and also a bit more readable.

I did not revert the HashMap changes of https://github.com/rust-lang/rust/pull/56243; using a deterministic map seems fine for the test harness and the more deterministic testing is the better.

Fixes https://github.com/rust-lang/rust/issues/59122
Fixes https://github.com/rust-lang/rust/issues/70492
library/test/src/lib.rs