Skip to content

Commit

Permalink
tests: Do not copy ignored files to test project
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 11, 2023
1 parent e0e9d9f commit f1f0f51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/.cspell/rust-dependencies.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ toml_edit = "0.19"
build-context = "0.1"
easy-ext = "1"
fs-err = "2"
ignore = "0.4"
tempfile = "3"
walkdir = "2"

[profile.release]
codegen-units = 1
Expand Down
4 changes: 2 additions & 2 deletions tests/auxiliary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub use build_context::TARGET;
use easy_ext::ext;
use fs_err as fs;
use tempfile::TempDir;
use walkdir::WalkDir;

pub fn fixtures_path() -> &'static Path {
Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fixtures"))
Expand Down Expand Up @@ -239,7 +238,8 @@ fn test_project(model: &str) -> Result<(TempDir, PathBuf)> {
workspace_root = tmpdir_path.to_path_buf();
}

for entry in WalkDir::new(&model_path).into_iter().filter_map(Result::ok) {
for entry in ignore::WalkBuilder::new(&model_path).hidden(false).build().filter_map(Result::ok)
{
let path = entry.path();
let tmp_path = &tmpdir_path.join(path.strip_prefix(&model_path)?);
if !tmp_path.exists() {
Expand Down

0 comments on commit f1f0f51

Please sign in to comment.