MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / run_tests

Function run_tests

scripts/coverage.rs:51–65  ·  view source on GitHub ↗
(root: &Path, args: &[String], rustflags: &str, profraw_pattern: &Path)

Source from the content-addressed store, hash-verified

49}
50
51fn run_tests(root: &Path, args: &[String], rustflags: &str, profraw_pattern: &Path) {
52 eprintln!("=== Running cargo test with coverage ===");
53 let status = Command::new("cargo")
54 .arg("test")
55 .args(args)
56 .env("RUSTFLAGS", rustflags)
57 .env("LLVM_PROFILE_FILE", profraw_pattern)
58 .current_dir(root)
59 .status()
60 .expect("failed to run cargo test");
61 if !status.success() {
62 eprintln!("cargo test failed with {status}");
63 std::process::exit(status.code().unwrap_or(1));
64 }
65}
66
67fn discover_test_binaries(
68 root: &Path,

Callers 1

mainFunction · 0.85

Calls 8

statusMethod · 0.80
newFunction · 0.50
expectMethod · 0.45
envMethod · 0.45
argsMethod · 0.45
argMethod · 0.45
successMethod · 0.45
codeMethod · 0.45

Tested by

no test coverage detected