diff --git a/crates/build/re_dev_tools/src/build_examples/snippets.rs b/crates/build/re_dev_tools/src/build_examples/snippets.rs index 7454c556b41c..6b8c8dd9da2f 100644 --- a/crates/build/re_dev_tools/src/build_examples/snippets.rs +++ b/crates/build/re_dev_tools/src/build_examples/snippets.rs @@ -36,8 +36,11 @@ impl Snippets { let snippet_root = snippets_dir.join("all"); let snippets = collect_snippets_recursively(&snippet_root, &config, &snippet_root)?; - println!("Running {} snippets…", snippets.len()); + println!("Download test assets…"); let progress = MultiProgress::new(); + download_test_assets(&progress)?; + + println!("Running {} snippets…", snippets.len()); let results: Vec> = snippets .into_par_iter() .map(|example| example.build(&progress, &self.output_dir)) @@ -190,3 +193,12 @@ struct OptOut { /// example name -> languages run: HashMap>, } + +fn download_test_assets(progress: &MultiProgress) -> anyhow::Result<()> { + let download_script = re_build_tools::cargo_metadata()? + .workspace_root + .join("tests/assets/download_test_assets.py"); + let mut cmd = Command::new("python3"); + cmd.arg(download_script.as_str()); + wait_for_output(cmd, "download test assets", progress) +}