From 186d6894d94f2a217ca36468fa95e4127b036d83 Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Sun, 21 Apr 2024 21:56:50 +0200 Subject: [PATCH] shorter tests --- scripts/TM_Subduction_example.jl | 2 +- test/test_examples.jl | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/TM_Subduction_example.jl b/scripts/TM_Subduction_example.jl index 70ba45c..ba4c92c 100644 --- a/scripts/TM_Subduction_example.jl +++ b/scripts/TM_Subduction_example.jl @@ -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 \ No newline at end of file diff --git a/test/test_examples.jl b/test/test_examples.jl index d1d668b..a00eeb2 100644 --- a/test/test_examples.jl +++ b/test/test_examples.jl @@ -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); @@ -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);