(project: &std::path::Path, args: &[&str])
| 56 | } |
| 57 | |
| 58 | fn run_git(project: &std::path::Path, args: &[&str]) { |
| 59 | let output = Command::new("git") |
| 60 | .args(["-c", "core.hooksPath=.git/no-hooks"]) |
| 61 | .args(args) |
| 62 | .current_dir(project) |
| 63 | .output() |
| 64 | .expect("git command should run"); |
| 65 | assert!( |
| 66 | output.status.success(), |
| 67 | "git {args:?} failed\nstdout:\n{}\nstderr:\n{}", |
| 68 | String::from_utf8_lossy(&output.stdout), |
| 69 | String::from_utf8_lossy(&output.stderr), |
| 70 | ); |
| 71 | } |
| 72 | |
| 73 | // --------------------------------------------------------------------------- |
| 74 | // is_test_file |
no test coverage detected