Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI tests #366

Merged
merged 24 commits into from
Mar 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions build/wflow_cli/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@ end
end
end

@testset "wflow_sbm_timing" begin

ENV["JULIA_NUM_THREADS"] = 1
toml = normpath(testdir, "sbm_config.toml")
time_sbm_1thread = @elapsed run(`$wflow_exe $toml`)

ENV["JULIA_NUM_THREADS"] = 4
time_sbm_4thread = @elapsed run(`$wflow_exe $toml`)

# Test if run with more threads is indeed faster
@test time_sbm_4thread < time_sbm_1thread
# Test timings of different runs (very depending on machine, be careful with numbers!)
@test time_sbm_1thread < 30
@test time_sbm_4thread < 20
end

@testset "wflow_sbm-gwf" begin
# Clean directory
rm(outputdir; force=true, recursive=true)
Expand Down Expand Up @@ -96,3 +80,19 @@ end
@test filesize(joinpath(outputdir, file)) > 0
end
end

@testset "wflow_sbm_timing" begin

ENV["JULIA_NUM_THREADS"] = 1
JoostBuitink marked this conversation as resolved.
Show resolved Hide resolved
toml = normpath(testdir, "sbm_config.toml")
time_sbm_1thread = @elapsed run(`$wflow_exe $toml`)

ENV["JULIA_NUM_THREADS"] = 4
time_sbm_4thread = @elapsed run(`$wflow_exe $toml`)

# Test if run with more threads is indeed faster
@test time_sbm_4thread < time_sbm_1thread
# Test timings of different runs (very depending on machine, be careful with numbers!)
@test time_sbm_1thread < 35
@test time_sbm_4thread < 25
end
Loading