Skip to content

Commit

Permalink
Add a hack to fix tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed May 24, 2024
1 parent b70fd6d commit 6687aa4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ template_options = Dict(
tmpdir1 = mktempdir()
tmpdir2 = mktempdir()

COPIERTemplate.generate(tmpdir1; data = template_options, vcs_ref = "main")
# This is a hack because Windows managed to dirty the repo.
if get(ENV, "CI", "nothing") == "true" && Sys.iswindows()
run(`git reset --hard HEAD`)
end

COPIERTemplate.generate(tmpdir1; data = template_options, vcs_ref = "HEAD")
bash_args = vcat([["-d"; "$k=$v"] for (k, v) in template_options]...)
ignore(line) = startswith("_commit")(line) || startswith("_src_path")(line)
template_path = joinpath(@__DIR__, "..")
Expand Down

0 comments on commit 6687aa4

Please sign in to comment.