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

Function create_run_script

src/executor/wall_time/executor.rs:320–330  ·  view source on GitHub ↗
(content: &str)

Source from the content-addressed store, hash-verified

318 #[test]
319 fn test_env_guard_no_crash() {
320 fn create_run_script(content: &str) -> anyhow::Result<NamedTempFile> {
321 let rwx = std::fs::Permissions::from_mode(0o777);
322 let mut script_file = tempfile::Builder::new()
323 .suffix(".sh")
324 .permissions(rwx)
325 .disable_cleanup(true)
326 .tempfile()?;
327 script_file.write_all(content.as_bytes())?;
328
329 Ok(script_file)
330 }
331
332 let mut tmp_dst = tempfile::NamedTempFile::new().unwrap();
333

Callers 1

test_env_guard_no_crashFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_env_guard_no_crashFunction · 0.56