Skip to content

Commit

Permalink
shorter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskaus committed Apr 21, 2024
1 parent 922cd17 commit 186d689
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/TM_Subduction_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ model.Solver = Solver( SolverType = "multigrid",

try testing == true
# if we run this as part of the test suite, use fewer timesteps
run_lamem(model, 8, "-nstep_max 5 -nstep_out 1")
run_lamem(model, 8, "-nstep_max 2 -nstep_out 1")
catch
run_lamem(model, 8) # run on 8 cores (if possible)
end
8 changes: 3 additions & 5 deletions test/test_examples.jl
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# This tests the example scripts
using Test

const testing = true
@testset "examples in /scripts" begin


# Subduction example
@testset "TM_Subduction_example" begin
testing = true
include("../scripts/TM_Subduction_example.jl")
data,time = read_LaMEM_timestep(model,last=true);
@test time 0.004419778
@test sum(data.fields.velocity[3][:,:,:]) 708.41907f0 rtol=1e-4 # check Vz
@test time 0.001736862
@test sum(data.fields.velocity[3][:,:,:]) 1192.9121f0 rtol=1e-4 # check Vz
end

# 3D subduction example
@testset "Subduction3D" begin
testing = true
clean_directory()
include("../scripts/Subduction3D.jl")
data,time = read_LaMEM_timestep(model,last=true);
Expand All @@ -25,7 +24,6 @@ using Test

# Strength envelop example
@testset "StrengthEnvelop" begin
testing = true
clean_directory()
include("../scripts/StrengthEnvelop.jl")
data,time = read_LaMEM_timestep(model,last=true);
Expand Down

0 comments on commit 186d689

Please sign in to comment.