File tree 3 files changed +7
-9
lines changed
src/tools/compiletest/src
3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -837,6 +837,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
837
837
"needs-sanitizer-thread" ,
838
838
"needs-threads" ,
839
839
"needs-unwind" ,
840
+ "needs-wasmtime" ,
840
841
"needs-xray" ,
841
842
"no-prefer-dynamic" ,
842
843
"normalize-stderr-32bit" ,
Original file line number Diff line number Diff line change @@ -149,6 +149,11 @@ pub(super) fn handle_needs(
149
149
condition : config. target_cfg ( ) . relocation_model == "pic" ,
150
150
ignore_reason : "ignored on targets without PIC relocation model" ,
151
151
} ,
152
+ Need {
153
+ name : "needs-wasmtime" ,
154
+ condition : config. runner . as_ref ( ) . is_some_and ( |r| r. contains ( "wasmtime" ) ) ,
155
+ ignore_reason : "ignored when wasmtime runner is not available" ,
156
+ } ,
152
157
] ;
153
158
154
159
let ( name, comment) = match ln. split_once ( [ ':' , ' ' ] ) {
Original file line number Diff line number Diff line change 1
1
//@ only-wasm32-wasip1
2
+ //@ needs-wasmtime
2
3
3
4
extern crate run_make_support;
4
5
@@ -11,15 +12,6 @@ fn main() {
11
12
12
13
let file = tmp_dir ( ) . join ( "foo.wasm" ) ;
13
14
14
- let has_wasmtime = match Command :: new ( "wasmtime" ) . arg ( "--version" ) . output ( ) {
15
- Ok ( s) => s. status . success ( ) ,
16
- _ => false ,
17
- } ;
18
- if !has_wasmtime {
19
- println ! ( "skipping test, wasmtime isn't available" ) ;
20
- return ;
21
- }
22
-
23
15
run ( & file, "return_two_i32" , "1\n 2\n " ) ;
24
16
run ( & file, "return_two_i64" , "3\n 4\n " ) ;
25
17
run ( & file, "return_two_f32" , "5\n 6\n " ) ;
You can’t perform that action at this time.
0 commit comments