MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / install_valgrind

Function install_valgrind

src/executor/valgrind/setup.rs:194–218  ·  view source on GitHub ↗
(
    system_info: &SystemInfo,
    setup_cache_dir: Option<&Path>,
)

Source from the content-addressed store, hash-verified

192}
193
194pub async fn install_valgrind(
195 system_info: &SystemInfo,
196 setup_cache_dir: Option<&Path>,
197) -> Result<()> {
198 apt::install_cached(
199 system_info,
200 setup_cache_dir,
201 || is_valgrind_installed(system_info),
202 || async {
203 debug!("Installing valgrind");
204 let binary = get_codspeed_valgrind_binary(system_info)?;
205 let deb_path = env::temp_dir().join("valgrind-codspeed.deb");
206 download_pinned_file(binary, &deb_path).await?;
207
208 // Install libc debug symbols alongside valgrind, as GitHub runners
209 // do not include them by default. Keeping them in the same install
210 // call puts them under the same caching and idempotency logic.
211 apt::install(system_info, &[deb_path.to_str().unwrap(), "libc6-dbg"])?;
212
213 // Return package names for caching
214 Ok(vec!["valgrind".to_string(), "libc6-dbg".to_string()])
215 },
216 )
217 .await
218}
219
220#[cfg(test)]
221mod tests {

Callers 1

setupMethod · 0.85

Calls 5

install_cachedFunction · 0.85
is_valgrind_installedFunction · 0.85
download_pinned_fileFunction · 0.85
installFunction · 0.50

Tested by

no test coverage detected