Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e05bc97

Browse files
committedMar 6, 2024
compiletest: Add a //@ needs-threads directive
This commit is extracted from rust-lang#122036 and adds a new directive to the `compiletest` test runner, `//@ needs-threads`. This is intended to capture the need that a target must implement threading to execute a specific test, typically one that uses `std::thread`. This is primarily done for WebAssembly targets which currently do not have threads by default. This enables transitioning a lot of `//@ ignore-wasm*`-style ignores into a more self-documenting `//@ needs-threads` directive. Additionally the `wasm32-wasi-preview1-threads` target, for example, does actually have threads, but isn't tested in CI at this time. This change enables running these tests for that target, but not other wasm targets.
1 parent ed82e19 commit e05bc97

File tree

77 files changed

+109
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+109
-76
lines changed
 

‎tests/ui/threads-sendsync/mpsc_stress.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-pass
22
//@ compile-flags:--test
3-
//@ ignore-emscripten
3+
//@ needs-threads
44

55
use std::sync::mpsc::channel;
66
use std::sync::mpsc::TryRecvError;

‎tests/ui/threads-sendsync/send-resource.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![allow(non_camel_case_types)]
55

66
//@ pretty-expanded FIXME #23616
7-
//@ ignore-emscripten no threads support
7+
//@ needs-threads
88

99
use std::thread;
1010
use std::sync::mpsc::channel;
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.