This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 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] = &[
837837 "needs-sanitizer-thread" ,
838838 "needs-threads" ,
839839 "needs-unwind" ,
840+ "needs-wasmtime" ,
840841 "needs-xray" ,
841842 "no-prefer-dynamic" ,
842843 "normalize-stderr-32bit" ,
Original file line number Diff line number Diff line change @@ -149,6 +149,11 @@ pub(super) fn handle_needs(
149149 condition : config. target_cfg ( ) . relocation_model == "pic" ,
150150 ignore_reason : "ignored on targets without PIC relocation model" ,
151151 } ,
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+ } ,
152157 ] ;
153158
154159 let ( name, comment) = match ln. split_once ( [ ':' , ' ' ] ) {
Original file line number Diff line number Diff line change 11//@ only-wasm32-wasip1
2+ //@ needs-wasmtime
23
34extern crate run_make_support;
45
@@ -11,15 +12,6 @@ fn main() {
1112
1213 let file = tmp_dir ( ) . join ( "foo.wasm" ) ;
1314
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-
2315 run ( & file, "return_two_i32" , "1\n 2\n " ) ;
2416 run ( & file, "return_two_i64" , "3\n 4\n " ) ;
2517 run ( & file, "return_two_f32" , "5\n 6\n " ) ;
You can’t perform that action at this time.
0 commit comments