()
| 3092 | |
| 3093 | #[test] |
| 3094 | fn profile_guest() -> Result<()> { |
| 3095 | let tmpdir = std::env::temp_dir(); |
| 3096 | let dir = tmpdir.to_string_lossy(); |
| 3097 | |
| 3098 | let output = run_wasmtime_for_output( |
| 3099 | &[ |
| 3100 | &format!("--profile=guest,{dir}/out.json"), |
| 3101 | "--env", |
| 3102 | "FOO=bar", |
| 3103 | "tests/all/cli_tests/print_env.wat", |
| 3104 | ], |
| 3105 | None, |
| 3106 | )?; |
| 3107 | |
| 3108 | let stdout = String::from_utf8_lossy(&output.stdout); |
| 3109 | let stderr = String::from_utf8_lossy(&output.stderr); |
| 3110 | println!("> stdout:\n{stdout}"); |
| 3111 | println!("> stderr:\n{stderr}"); |
| 3112 | assert!(output.status.success()); |
| 3113 | assert!(!stderr.contains("Error")); |
| 3114 | let out_json = std::fs::read_to_string(format!("{dir}/out.json")).unwrap(); |
| 3115 | println!("> out.json:\n{out_json}"); |
| 3116 | Ok(()) |
| 3117 | } |
| 3118 | |
| 3119 | #[test] |
| 3120 | fn unreachable_without_wasi() -> Result<()> { |
nothing calls this directly
no test coverage detected