From 121722e66574171b8040635b7f6aa71bdfcaea6d Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 16:09:57 +0200 Subject: [PATCH 01/15] Use GitHub workflow commands for improved workflow logs --- test/test_trixi.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 2ada15e4a3b..b519322c52e 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -174,8 +174,12 @@ after execution. """ macro timed_testset(name, expr) @assert name isa String + filename = string(__source__.file) + lineno = string(__source__.line) quote local time_start = time_ns() + println("::notice file=", $filename, ",line=", $lineno, ",title=", $name, "::") + println("::group::", $name) @testset $name $expr local time_stop = time_ns() if Trixi.mpi_isroot() @@ -184,6 +188,7 @@ macro timed_testset(name, expr) *string(1.0e-9 * (time_stop - time_start))*" seconds.\n") flush(stdout) end + println("::endgroup::") end end @@ -197,6 +202,8 @@ of the testset similarly to [`timed_testset`](@ref). """ macro trixi_testset(name, expr) @assert name isa String + filename = string(__source__.file) + lineno = string(__source__.line) # TODO: `@eval` is evil # We would like to use # mod = gensym(name) @@ -220,6 +227,8 @@ macro trixi_testset(name, expr) catch nothing end + println("::notice file=", $filename, ",line=", $lineno, ",title=", $name, "::") + println("::group::", $name) @testset $name $expr end local time_stop = time_ns() @@ -228,6 +237,7 @@ macro trixi_testset(name, expr) @info("Testset "*$name*" finished in " *string(1.0e-9 * (time_stop - time_start))*" seconds.\n") end + println("::endgroup::") nothing end end From 27747d054913b112e10c36b653f70c02ba22f8bb Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 16:26:06 +0200 Subject: [PATCH 02/15] Try to fix notice --- test/test_trixi.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index b519322c52e..c002fc760d2 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -178,8 +178,9 @@ macro timed_testset(name, expr) lineno = string(__source__.line) quote local time_start = time_ns() - println("::notice file=", $filename, ",line=", $lineno, ",title=", $name, "::") + println("::notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) println("::group::", $name) + println("Testset started at: ", $file, ":", $lineno) @testset $name $expr local time_stop = time_ns() if Trixi.mpi_isroot() @@ -227,8 +228,10 @@ macro trixi_testset(name, expr) catch nothing end - println("::notice file=", $filename, ",line=", $lineno, ",title=", $name, "::") + println("::notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) println("::group::", $name) + println("notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) + println("Testset started at: ", $file, ":", $lineno) @testset $name $expr end local time_stop = time_ns() From 7e04439454df6eea13728302605d74cb42a76f79 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 16:29:16 +0200 Subject: [PATCH 03/15] Fix variable name --- test/test_trixi.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index c002fc760d2..f6c81eb01e7 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -180,7 +180,7 @@ macro timed_testset(name, expr) local time_start = time_ns() println("::notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) println("::group::", $name) - println("Testset started at: ", $file, ":", $lineno) + println(">>> Testset started at ", $filename, ":", $lineno) @testset $name $expr local time_stop = time_ns() if Trixi.mpi_isroot() @@ -231,7 +231,7 @@ macro trixi_testset(name, expr) println("::notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) println("::group::", $name) println("notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) - println("Testset started at: ", $file, ":", $lineno) + println(">>> Testset started at ", $filename, ":", $lineno) @testset $name $expr end local time_stop = time_ns() From aa09a7d394a314b1bfe3687e7a50e3f72cf63419 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 16:48:36 +0200 Subject: [PATCH 04/15] Only use GitHub workflow commands on GitHub --- test/test_trixi.jl | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index f6c81eb01e7..1223f297bf0 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -1,6 +1,8 @@ using Test: @test import Trixi +const CI_ON_GITHUB = get(ENV, "GITHUB_ACTIONS", false) == "true" + # Use a macro to avoid world age issues when defining new initial conditions etc. # inside an elixir. """ @@ -178,9 +180,12 @@ macro timed_testset(name, expr) lineno = string(__source__.line) quote local time_start = time_ns() - println("::notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) - println("::group::", $name) - println(">>> Testset started at ", $filename, ":", $lineno) + # Use GitHub workflow commands for improved CI logs + if CI_ON_GITHUB + println("::group::>>> Running testset '", $name, "'...") + println("Testset started at ", $filename, ":", $lineno) + println("::notice file=test/test_trixi.jl,line=236::Something to note") + end @testset $name $expr local time_stop = time_ns() if Trixi.mpi_isroot() @@ -189,7 +194,9 @@ macro timed_testset(name, expr) *string(1.0e-9 * (time_stop - time_start))*" seconds.\n") flush(stdout) end - println("::endgroup::") + if CI_ON_GITHUB + println("::endgroup::") + end end end @@ -228,10 +235,12 @@ macro trixi_testset(name, expr) catch nothing end - println("::notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) - println("::group::", $name) - println("notice file=", $filename, ",line=", $lineno, ",endLine=", $lineno, "::", $name) - println(">>> Testset started at ", $filename, ":", $lineno) + # Use GitHub workflow commands for improved CI logs + if CI_ON_GITHUB + println("::group::>>> Running testset '", $name, "'...") + println("Testset started at ", $filename, ":", $lineno) + println("::notice file=test/test_trixi.jl,line=236::Something to note") + end @testset $name $expr end local time_stop = time_ns() @@ -240,7 +249,9 @@ macro trixi_testset(name, expr) @info("Testset "*$name*" finished in " *string(1.0e-9 * (time_stop - time_start))*" seconds.\n") end - println("::endgroup::") + if CI_ON_GITHUB + println("::endgroup::") + end nothing end end From 63a6e99e460a549b0565dd6e26c95871b2a4cb26 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 16:58:57 +0200 Subject: [PATCH 05/15] Remove notice - does not seem to link to the provided file :disappointed: --- test/test_trixi.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 1223f297bf0..2df0bdd4dba 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -184,7 +184,6 @@ macro timed_testset(name, expr) if CI_ON_GITHUB println("::group::>>> Running testset '", $name, "'...") println("Testset started at ", $filename, ":", $lineno) - println("::notice file=test/test_trixi.jl,line=236::Something to note") end @testset $name $expr local time_stop = time_ns() @@ -239,7 +238,6 @@ macro trixi_testset(name, expr) if CI_ON_GITHUB println("::group::>>> Running testset '", $name, "'...") println("Testset started at ", $filename, ":", $lineno) - println("::notice file=test/test_trixi.jl,line=236::Something to note") end @testset $name $expr end From 73305dc84fdb8452bfd430779fc6946a21b44be6 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 16:59:24 +0200 Subject: [PATCH 06/15] Modify elixir to break some tests for verification --- examples/tree_2d_dgsem/elixir_advection_basic.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tree_2d_dgsem/elixir_advection_basic.jl b/examples/tree_2d_dgsem/elixir_advection_basic.jl index 3e011d8a9f5..944b9dea230 100644 --- a/examples/tree_2d_dgsem/elixir_advection_basic.jl +++ b/examples/tree_2d_dgsem/elixir_advection_basic.jl @@ -4,13 +4,13 @@ using Trixi ############################################################################### # semidiscretization of the linear advection equation -advection_velocity = (0.2, -0.7) +advection_velocity = (0.3, -0.7) equations = LinearScalarAdvectionEquation2D(advection_velocity) # Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs) -coordinates_min = (-1.0, -1.0) # minimum coordinates (min(x), min(y)) +coordinates_min = (-1.1, -1.0) # minimum coordinates (min(x), min(y)) coordinates_max = (1.0, 1.0) # maximum coordinates (max(x), max(y)) # Create a uniformly refined mesh with periodic boundaries From 3dcffea58c59289626b00db47c15a23175e7c3de Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 17:18:39 +0200 Subject: [PATCH 07/15] Show clickable link --- test/test_trixi.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 2df0bdd4dba..c22519d36e9 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -2,6 +2,9 @@ using Test: @test import Trixi const CI_ON_GITHUB = get(ENV, "GITHUB_ACTIONS", false) == "true" +const GITHUB_BASE_URL = get(ENV, "GITHUB_SERVER_URL", "https://github.com") * + "/" * get(ENV, "GITHUB_REPOSITORY", "") * "/blob/" * get(ENV, "GITHUB_REF", "") * "/" +const GITHUB_TEST_URL = GITHUB_BASE_URL * "test/" # Use a macro to avoid world age issues when defining new initial conditions etc. # inside an elixir. @@ -183,7 +186,7 @@ macro timed_testset(name, expr) # Use GitHub workflow commands for improved CI logs if CI_ON_GITHUB println("::group::>>> Running testset '", $name, "'...") - println("Testset started at ", $filename, ":", $lineno) + println("Testset started at ", $GITHUB_TEST_URL, $filename, "#L", $lineno) end @testset $name $expr local time_stop = time_ns() @@ -237,7 +240,7 @@ macro trixi_testset(name, expr) # Use GitHub workflow commands for improved CI logs if CI_ON_GITHUB println("::group::>>> Running testset '", $name, "'...") - println("Testset started at ", $filename, ":", $lineno) + println("Testset started at ", $GITHUB_TEST_URL, $filename, "#L", $lineno) end @testset $name $expr end From 26d0de3a1bc8833e077ed435d040a4e96b8cc13c Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 19:54:39 +0200 Subject: [PATCH 08/15] Fix url to testset file/line --- test/test_trixi.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index c22519d36e9..b45380f25eb 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -3,7 +3,7 @@ import Trixi const CI_ON_GITHUB = get(ENV, "GITHUB_ACTIONS", false) == "true" const GITHUB_BASE_URL = get(ENV, "GITHUB_SERVER_URL", "https://github.com") * - "/" * get(ENV, "GITHUB_REPOSITORY", "") * "/blob/" * get(ENV, "GITHUB_REF", "") * "/" + "/" * get(ENV, "GITHUB_REPOSITORY", "") * "/blob/" * get(ENV, "GITHUB_SHA", "") * "/" const GITHUB_TEST_URL = GITHUB_BASE_URL * "test/" # Use a macro to avoid world age issues when defining new initial conditions etc. @@ -179,7 +179,7 @@ after execution. """ macro timed_testset(name, expr) @assert name isa String - filename = string(__source__.file) + filename = basename(string(__source__.file)) lineno = string(__source__.line) quote local time_start = time_ns() @@ -212,7 +212,7 @@ of the testset similarly to [`timed_testset`](@ref). """ macro trixi_testset(name, expr) @assert name isa String - filename = string(__source__.file) + filename = basename(string(__source__.file)) lineno = string(__source__.line) # TODO: `@eval` is evil # We would like to use From 18ad5975bea4921f813b637db520933acda6f0d8 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 20:14:34 +0200 Subject: [PATCH 09/15] Stronger error --- examples/tree_2d_dgsem/elixir_advection_basic.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tree_2d_dgsem/elixir_advection_basic.jl b/examples/tree_2d_dgsem/elixir_advection_basic.jl index 944b9dea230..5d27aa139b3 100644 --- a/examples/tree_2d_dgsem/elixir_advection_basic.jl +++ b/examples/tree_2d_dgsem/elixir_advection_basic.jl @@ -10,7 +10,7 @@ equations = LinearScalarAdvectionEquation2D(advection_velocity) # Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs) -coordinates_min = (-1.1, -1.0) # minimum coordinates (min(x), min(y)) +coordinates_min = (-11.1, -1.0) # minimum coordinates (min(x), min(y)) coordinates_max = (1.0, 1.0) # maximum coordinates (max(x), max(y)) # Create a uniformly refined mesh with periodic boundaries From 06425819d6fe70a94f228e57ee2008dad8de0ee7 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 4 Apr 2025 20:16:41 +0200 Subject: [PATCH 10/15] Update test/test_trixi.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- test/test_trixi.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index b45380f25eb..44c24ac3699 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -3,7 +3,8 @@ import Trixi const CI_ON_GITHUB = get(ENV, "GITHUB_ACTIONS", false) == "true" const GITHUB_BASE_URL = get(ENV, "GITHUB_SERVER_URL", "https://github.com") * - "/" * get(ENV, "GITHUB_REPOSITORY", "") * "/blob/" * get(ENV, "GITHUB_SHA", "") * "/" + "/" * get(ENV, "GITHUB_REPOSITORY", "") * "/blob/" * + get(ENV, "GITHUB_SHA", "") * "/" const GITHUB_TEST_URL = GITHUB_BASE_URL * "test/" # Use a macro to avoid world age issues when defining new initial conditions etc. From 2d0c2ef0eac88d95a09c9b35bdb9b81bfa7cc762 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Sat, 5 Apr 2025 06:06:55 +0200 Subject: [PATCH 11/15] @testset -> @timed_testset --- test/test_visualization.jl | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 28cfc52edcf..8db4dcca967 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -18,7 +18,7 @@ outdir = "out" isdir(outdir) && rm(outdir, recursive = true) # Run various visualization tests -@testset "Visualization tests" begin +@timed_testset "Visualization tests" begin #! format: noindent # Run 2D tests with elixirs for all mesh types @@ -32,7 +32,7 @@ test_examples_2d = Dict("TreeMesh" => ("tree_2d_dgsem", "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), "DGMulti" => ("dgmulti_2d", "elixir_euler_weakform.jl")) -@testset "PlotData2D, PlotDataSeries, PlotMesh with $mesh" for mesh in keys(test_examples_2d) +@timed_testset "PlotData2D, PlotDataSeries, PlotMesh with $mesh" for mesh in keys(test_examples_2d) # Run Trixi.jl directory, elixir = test_examples_2d[mesh] @test_nowarn_mod trixi_include(@__MODULE__, @@ -88,7 +88,7 @@ test_examples_2d = Dict("TreeMesh" => ("tree_2d_dgsem", @test_nowarn_mod show(stdout, getmesh(pd)) println(stdout) - @testset "2D plot recipes" begin + @timed_testset "2D plot recipes" begin pd = PlotData2D(sol) @test_nowarn_mod Plots.plot(sol) @@ -112,9 +112,9 @@ test_examples_2d = Dict("TreeMesh" => ("tree_2d_dgsem", end end - @testset "1D plot from 2D solution" begin + @timed_testset "1D plot from 2D solution" begin if mesh != "DGMulti" - @testset "Create 1D plot as slice" begin + @timed_testset "Create 1D plot as slice" begin @test_nowarn_mod PlotData1D(sol, slice = :y, point = (0.5, 0.0)) isa PlotData1D @test_nowarn_mod PlotData1D(sol, slice = :x, point = (0.5, 0.0)) isa @@ -122,7 +122,7 @@ test_examples_2d = Dict("TreeMesh" => ("tree_2d_dgsem", pd1D = PlotData1D(sol, slice = :y, point = (0.5, 0.0)) @test_nowarn_mod Plots.plot(pd1D) - @testset "Create 1D plot along curve" begin + @timed_testset "Create 1D plot along curve" begin curve = zeros(2, 10) curve[1, :] = range(-1, 1, length = 10) @test_nowarn_mod PlotData1D(sol, curve = curve) isa PlotData1D @@ -186,7 +186,7 @@ end pd2 = PlotData1D(sol, nvisnodes = 2) @test size(pd2.data) == (128, 3) - @testset "1D plot recipes" begin + @timed_testset "1D plot recipes" begin pd = PlotData1D(sol) @test_nowarn_mod Plots.plot(sol) @@ -202,7 +202,7 @@ end # Fake a PlotDataXD objects to test code for plotting multiple variables on at least two rows # with at least one plot remaining empty - @testset "plotting multiple variables" begin + @timed_testset "plotting multiple variables" begin x = collect(0.0:0.1:1.0) data1d = rand(5, 11) variable_names = string.('a':'e') @@ -224,7 +224,7 @@ end @trixi_testset "Create 1D plot along curve" begin using OrdinaryDiffEqSSPRK - @testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) + @timed_testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) equations = CompressibleEulerEquations2D(1.4) solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs) @@ -320,7 +320,7 @@ end x_curve = range(0, 1, length = 1000) curve = vcat(x_curve', x_curve') - @testset "TreeMesh" begin + @timed_testset "TreeMesh" begin pd_tree = @inferred PlotData1D(ode_tree.u0, ode_tree.p; curve) @test pd_tree.x ≈ range(0, 1, length = length(x_curve)) * sqrt(2) @@ -336,7 +336,7 @@ end end end - @testset "P4estMesh" begin + @timed_testset "P4estMesh" begin pd_p4est = @inferred PlotData1D(ode_p4est.u0, ode_p4est.p; curve) @test pd_p4est.x ≈ range(0, 1, length = length(x_curve)) * sqrt(2) @@ -352,7 +352,7 @@ end end end - @testset "T8codeMesh" begin + @timed_testset "T8codeMesh" begin pd_t8code = @inferred PlotData1D(ode_t8code.u0, ode_t8code.p; curve) @test pd_t8code.x ≈ range(0, 1, length = length(x_curve)) * sqrt(2) @@ -371,7 +371,7 @@ end end end - @testset "StructuredMesh" begin + @timed_testset "StructuredMesh" begin pd_structured = @inferred PlotData1D(ode_structured.u0, ode_structured.p; curve) @test pd_structured.x ≈ range(0, 1, length = length(x_curve)) * sqrt(2) @@ -468,8 +468,8 @@ end @test PlotData2D(sol, slice = :yz) isa Trixi.PlotData2DCartesian @test PlotData2D(sol, slice = :xz) isa Trixi.PlotData2DCartesian - @testset "1D plot from 3D solution and Tree-mesh" begin - @testset "Create 1D plot as slice" begin + @timed_testset "1D plot from 3D solution and Tree-mesh" begin + @timed_testset "Create 1D plot as slice" begin @test_nowarn_mod PlotData1D(sol) isa PlotData1D pd1D = PlotData1D(sol) @test_nowarn_mod Plots.plot(pd1D) @@ -479,7 +479,7 @@ end PlotData1D end - @testset "Create 1D plot along curve" begin + @timed_testset "Create 1D plot along curve" begin curve = zeros(3, 10) curve[1, :] = range(-1.0, -0.5, length = 10) @test_nowarn_mod PlotData1D(sol, curve = curve) isa PlotData1D @@ -492,8 +492,8 @@ end joinpath(examples_dir(), "structured_3d_dgsem", "elixir_advection_basic.jl")) - @testset "1D plot from 3D solution and general mesh" begin - @testset "Create 1D plot as slice" begin + @timed_testset "1D plot from 3D solution and general mesh" begin + @timed_testset "Create 1D plot as slice" begin @test_nowarn_mod PlotData1D(sol) isa PlotData1D pd1D = PlotData1D(sol) @test_nowarn_mod Plots.plot(pd1D) @@ -503,7 +503,7 @@ end PlotData1D end - @testset "Create 1D plot along curve" begin + @timed_testset "Create 1D plot along curve" begin curve = zeros(3, 10) curve[1, :] = range(-1.0, 1.0, length = 10) @test_nowarn_mod PlotData1D(sol, curve = curve) isa PlotData1D @@ -516,7 +516,7 @@ end @trixi_testset "Create 1D plot along curve" begin using OrdinaryDiffEqSSPRK - @testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) + @timed_testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) equations = CompressibleEulerEquations3D(1.4) solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs) @@ -615,7 +615,7 @@ end x_curve = range(0, 1, length = 1000) curve = vcat(x_curve', x_curve', x_curve') - @testset "TreeMesh" begin + @timed_testset "TreeMesh" begin pd_tree = @inferred PlotData1D(ode_tree.u0, ode_tree.p; curve) @test pd_tree.x ≈ range(0, 1, length = length(x_curve)) * sqrt(3) @@ -633,7 +633,7 @@ end end end - @testset "P4estMesh" begin + @timed_testset "P4estMesh" begin pd_p4est = @inferred PlotData1D(ode_p4est.u0, ode_p4est.p; curve) @test pd_p4est.x ≈ range(0, 1, length = length(x_curve)) * sqrt(3) @@ -651,7 +651,7 @@ end end end - @testset "T8codeMesh" begin + @timed_testset "T8codeMesh" begin pd_t8code = @inferred PlotData1D(ode_t8code.u0, ode_t8code.p; curve) @test pd_t8code.x ≈ range(0, 1, length = length(x_curve)) * sqrt(3) @@ -669,7 +669,7 @@ end end end - @testset "StructuredMesh" begin + @timed_testset "StructuredMesh" begin pd_structured = @inferred PlotData1D(ode_structured.u0, ode_structured.p; curve) @test pd_structured.x ≈ range(0, 1, length = length(x_curve)) * sqrt(3) @@ -718,13 +718,13 @@ end plot_creator = Trixi.save_plot), tspan = (0.0, 3.0)) - @testset "elixir_advection_amr_visualization.jl with save_plot" begin + @timed_testset "elixir_advection_amr_visualization.jl with save_plot" begin @test isfile(joinpath(outdir, "solution_000000000.png")) @test isfile(joinpath(outdir, "solution_000000020.png")) @test isfile(joinpath(outdir, "solution_000000022.png")) end - @testset "show" begin + @timed_testset "show" begin @test_nowarn_mod show(stdout, visualization) println(stdout) From 283685ee5dce216567e9368a2b2e5300c9487eb4 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Sat, 5 Apr 2025 06:38:00 +0200 Subject: [PATCH 12/15] Use testset where otherwise assertion would be hit --- test/test_visualization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 8db4dcca967..51075d6598e 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -32,7 +32,7 @@ test_examples_2d = Dict("TreeMesh" => ("tree_2d_dgsem", "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), "DGMulti" => ("dgmulti_2d", "elixir_euler_weakform.jl")) -@timed_testset "PlotData2D, PlotDataSeries, PlotMesh with $mesh" for mesh in keys(test_examples_2d) +@testset "PlotData2D, PlotDataSeries, PlotMesh with $mesh" for mesh in keys(test_examples_2d) # Run Trixi.jl directory, elixir = test_examples_2d[mesh] @test_nowarn_mod trixi_include(@__MODULE__, From ca7c3a1785992872e2840100ff4215c4042321d2 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Sat, 5 Apr 2025 07:22:27 +0200 Subject: [PATCH 13/15] Use testset where otherwise assertion would be hit --- test/test_visualization.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 51075d6598e..b2187d26502 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -224,7 +224,7 @@ end @trixi_testset "Create 1D plot along curve" begin using OrdinaryDiffEqSSPRK - @timed_testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) + @testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) equations = CompressibleEulerEquations2D(1.4) solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs) @@ -516,7 +516,7 @@ end @trixi_testset "Create 1D plot along curve" begin using OrdinaryDiffEqSSPRK - @timed_testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) + @testset "$MeshType" for MeshType in (P4estMesh, T8codeMesh) equations = CompressibleEulerEquations3D(1.4) solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs) From 29d9311926af8d5fbda00b5ff56df028b6da8a06 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Sat, 5 Apr 2025 20:49:46 +0200 Subject: [PATCH 14/15] Try creating a separate module for each test --- test/test_trixi.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 44c24ac3699..43f1eb31558 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -226,7 +226,8 @@ macro trixi_testset(name, expr) # module name here. quote local time_start = time_ns() - @eval module TrixiTestModule + local tempmod = Module(gensym("TrixiTestModule")) + @eval module tempmod using Test using Trixi include(@__FILE__) From f66296c1e1523b3706ddd2b64a3511d2bbe7871b Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Sat, 5 Apr 2025 20:59:22 +0200 Subject: [PATCH 15/15] Undo previous commit --- test/test_trixi.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_trixi.jl b/test/test_trixi.jl index 43f1eb31558..44c24ac3699 100644 --- a/test/test_trixi.jl +++ b/test/test_trixi.jl @@ -226,8 +226,7 @@ macro trixi_testset(name, expr) # module name here. quote local time_start = time_ns() - local tempmod = Module(gensym("TrixiTestModule")) - @eval module tempmod + @eval module TrixiTestModule using Test using Trixi include(@__FILE__)