pub fn dny_run_batch_use_cache<I, T>(
task: I,
task_timeout: Option<Duration>,
only_build: Option<bool>,
on_result: Option<Box<dyn FnMut(String, DnyResult)>>,
) -> Vec<(String, DnyResult)>Available on crate feature
dyntest only.Expand description
批量运行的便捷入口(启用首任务依赖预热缓存,首个结果为 "init_cache")。
§Feature Requirement
需要同时启用 "dyntest" 与 "std" 特性。
§Examples
use lib_unknown::dyntest::{DnyTask, dny_run_batch_use_cache};
let results = dny_run_batch_use_cache([DnyTask::new("a", "fn main() {}")], None, None, None);
assert_eq!(results[0].0, "init_cache");§Panics
- 任务工程目录创建/文件写入失败时 panic,源于内部
DnyRun初始化。