Skip to content

Commit

Permalink
fix windows 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 committed Oct 3, 2023
1 parent 0f86fc4 commit 915d8d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.8'
- '1.9'
- '~1.10.0-'
- 'nightly'
os:
- ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/file-saving.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ end


function in_new_log_dir(f, job_out::String)
date_part = Dates.format(Dates.now(),DATE_FORMAT)
date_part = Dates.format(Dates.now(),"yyyy-mm-ddTHH-MM-SS")
rand_part = Random.randstring(RandomDevice(), 12)
new_name = date_part*"_"*rand_part
all_logs = mkpath(joinpath(job_out, "logs"))
Expand Down
27 changes: 4 additions & 23 deletions test/test_ref_out.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ ref_out = joinpath(@__DIR__, "example/output-ref")
warn_only_logger = MinLevelLogger(current_logger(), Logging.Warn);


@testset "good example" begin
@testset "full run example" begin
for continue_sim in (true,false)
test_out = joinpath(@__DIR__, "example/output/good")
test_out = joinpath(@__DIR__, "example/output/full",continue_sim ? "con" : "start")
rm(test_out; force=true, recursive=true)
args = ["--out=$test_out","--batch=1"]
continue_sim && push!(args,"--continue")
Expand All @@ -40,26 +40,7 @@ warn_only_logger = MinLevelLogger(current_logger(), Logging.Warn);
end
end
end
@testset "good example" begin
test_out = joinpath(@__DIR__, "example/output/good")
rm(test_out; force=true, recursive=true)
with_logger(warn_only_logger) do
MEDYANSimRunner.run_sim(["--out=$test_out","--batch=1","--continue"];
UserCode.jobs,
UserCode.setup,
UserCode.save_snapshot,
UserCode.load_snapshot,
UserCode.loop,
UserCode.done,
)
end
out_diff = sprint(MEDYANSimRunner.print_traj_diff, joinpath(ref_out,"1"), joinpath(test_out,"1"))
if !isempty(out_diff)
println(out_diff)
@test false
end
end
@testset "partial restart example $v" for v in 1:5
@testset "partial restart example $v" for v in 1:4
test_out = joinpath(@__DIR__, "example/output/restart $v")
rm(test_out; force=true, recursive=true)
mkpath(test_out)
Expand All @@ -80,7 +61,7 @@ end
@test false
end
end
@testset "partial continue example $v" for v in 1:5
@testset "partial continue example $v" for v in 1:4
test_out = joinpath(@__DIR__, "example/output/continue $v")
rm(test_out; force=true, recursive=true)
mkpath(test_out)
Expand Down

0 comments on commit 915d8d6

Please sign in to comment.