You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// - `TempDir`: The temporary directory containing the modified Go project. This directory will be automatically deleted when dropped (only in tests).
29
+
/// - `PathBuf`: The path to the generated runner.go file. This should be passed to the `build_binary` function to build
30
+
/// the binary that will execute the benchmarks.
31
+
pubfnrun<P:AsRef<Path>>(
32
+
package:&BenchmarkPackage,
33
+
profile_dir:P,
34
+
) -> anyhow::Result<(TempDir,PathBuf)>{
31
35
// Create a temporary target directory for building the modified Go project.
36
+
letmut target_dir = TempDir::new()?;
37
+
32
38
// NOTE: We don't want to spend time cleanup any temporary files since the code is only
33
39
// run on CI servers which clean up themselves.
34
-
let target_dir = TempDir::new()?.keep();
40
+
// However, avoid filling the disk with temporary files of tests (otherwise CI fails).
41
+
target_dir.disable_cleanup(cfg!(not(test)));
35
42
36
43
// 1. Copy the whole git repository to a build directory
37
44
let git_root = ifletOk(git_dir) = utils::get_parent_git_repo_path(&package.module.dir){
0 commit comments