File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use anyhow::Context;
7
7
use pico_args:: Arguments ;
8
8
9
9
mod cts;
10
+ mod miri;
10
11
mod run_wasm;
11
12
mod test;
12
13
mod util;
@@ -37,6 +38,14 @@ Commands:
37
38
38
39
All extra arguments will be forwarded to cargo-nextest (NOT wgpu-info)
39
40
41
+ miri
42
+ Run all miri-compatible tests under miri. Requires a nightly toolchain
43
+ with the x86_64-unknown-linux-gnu target and miri component installed.
44
+
45
+ --toolchain <toolchain> The toolchain to use for miri tests.
46
+ Must be a nightly toolchain.
47
+ Defaults to `nightly`.
48
+
40
49
vendor-web-sys
41
50
Re-vendor the WebGPU web-sys bindings.
42
51
@@ -85,6 +94,7 @@ fn main() -> anyhow::Result<ExitCode> {
85
94
match subcommand. as_deref ( ) {
86
95
Some ( "cts" ) => cts:: run_cts ( shell, args) ?,
87
96
Some ( "run-wasm" ) => run_wasm:: run_wasm ( shell, args) ?,
97
+ Some ( "miri" ) => miri:: run_miri ( shell, args) ?,
88
98
Some ( "test" ) => test:: run_tests ( shell, args) ?,
89
99
Some ( "vendor-web-sys" ) => vendor_web_sys:: run_vendor_web_sys ( shell, args) ?,
90
100
Some ( subcommand) => {
Original file line number Diff line number Diff line change
1
+ use pico_args:: Arguments ;
2
+ use xshell:: Shell ;
3
+
4
+ pub fn run_miri ( shell : Shell , mut args : Arguments ) -> anyhow:: Result < ( ) > {
5
+ let toolchain: String = args
6
+ . opt_value_from_str ( "--toolchain" ) ?
7
+ . unwrap_or_else ( || String :: from ( "nightly" ) ) ;
8
+
9
+ shell
10
+ . cmd ( "rustup" )
11
+ . args ( [
12
+ "run" ,
13
+ & toolchain,
14
+ "cargo" ,
15
+ "miri" ,
16
+ "nextest" ,
17
+ "run" ,
18
+ "--target" ,
19
+ "x86_64-unknown-linux-gnu" ,
20
+ ] )
21
+ . env (
22
+ "MIRIFLAGS" ,
23
+ "-Zmiri-disable-isolation -Zmiri-deterministic-floats" ,
24
+ )
25
+ . quiet ( )
26
+ . run ( ) ?;
27
+
28
+ Ok ( ( ) )
29
+ }
You can’t perform that action at this time.
0 commit comments