Skip to content

Commit a20d4c7

Browse files
committed
tests: Use git::copy_tracked_files from test-helper
1 parent b19979f commit a20d4c7

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ toml_edit = "0.22.7"
3737
[dev-dependencies]
3838
build-context = "0.1"
3939
easy-ext = "1"
40-
fs-err = "3"
4140
tempfile = { version = "3", default-features = false }
42-
test-helper = { features = ["cli", "doc", "git"], git = "https://github.com/taiki-e/test-helper.git", rev = "d2272e8" }
41+
test-helper = { features = ["cli", "doc", "git"], git = "https://github.com/taiki-e/test-helper.git", rev = "f38a7f5" }
4342

4443
[lints]
4544
workspace = true

tests/auxiliary/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use std::{
1212
use anyhow::Context as _;
1313
pub(crate) use build_context::TARGET;
1414
use easy_ext::ext;
15-
use fs_err as fs;
1615

1716
pub(crate) fn manifest_dir() -> &'static Path {
1817
Path::new(env!("CARGO_MANIFEST_DIR"))
@@ -209,13 +208,6 @@ fn test_project(model: &str) -> (tempfile::TempDir, PathBuf) {
209208
workspace_root = tmpdir_path.to_path_buf();
210209
}
211210

212-
for (file_name, from) in test_helper::git::ls_files(model_path, &[]) {
213-
let to = &tmpdir_path.join(file_name);
214-
if !to.parent().unwrap().is_dir() {
215-
fs::create_dir_all(to.parent().unwrap()).unwrap();
216-
}
217-
fs::copy(from, to).unwrap();
218-
}
219-
211+
test_helper::git::copy_tracked_files(model_path, tmpdir_path);
220212
(tmpdir, workspace_root)
221213
}

0 commit comments

Comments
 (0)