mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-19 09:54:55 +00:00
Update runtests.jl
* Explicitly call test files instead of for loop * Call Documenter before and after unit tests
This commit is contained in:
+159
-21
@@ -1,29 +1,167 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
|
||||
using Base.Test
|
||||
using TimerOutputs
|
||||
using JuliaFEM, Test
|
||||
|
||||
pkg_dir = dirname(@__DIR__)
|
||||
maybe_test_files = readdir(joinpath(pkg_dir, "test"))
|
||||
is_test_file(fn) = startswith(fn, "test_") & endswith(fn, ".jl")
|
||||
test_files = filter(is_test_file, maybe_test_files)
|
||||
info("$(length(test_files)) test files found.")
|
||||
include("../docs/make.jl")
|
||||
|
||||
const to = TimerOutput()
|
||||
@testset "JuliaFEM.jl" begin
|
||||
for fn in test_files
|
||||
info("----- Running tests from file $fn -----")
|
||||
t0 = time()
|
||||
@testset "$fn" begin
|
||||
timeit(to, fn) do
|
||||
include(fn)
|
||||
end
|
||||
end
|
||||
dt = round(time() - t0, 2)
|
||||
info("----- Testing file $fn completed in $dt seconds -----")
|
||||
@testset "test_dirichlet.jl" begin
|
||||
include("test_dirichlet.jl")
|
||||
end
|
||||
@testset "test_elasticity_1d.jl" begin
|
||||
include("test_elasticity_1d.jl")
|
||||
end
|
||||
@testset "test_elasticity_2d_linear_with_surface_load.jl" begin
|
||||
include("test_elasticity_2d_linear_with_surface_load.jl")
|
||||
end
|
||||
@testset "test_elasticity_2d_nonhomogeneous_boundary_conditions.jl" begin
|
||||
include("test_elasticity_2d_nonhomogeneous_boundary_conditions.jl")
|
||||
end
|
||||
@testset "test_elasticity_2d_nonlinear_with_surface_load.jl" begin
|
||||
include("test_elasticity_2d_nonlinear_with_surface_load.jl")
|
||||
end
|
||||
@testset "test_elasticity_2d_plane_stress_stiffness_matrix.jl" begin
|
||||
include("test_elasticity_2d_plane_stress_stiffness_matrix.jl")
|
||||
end
|
||||
@testset "test_elasticity_2d_residual.jl" begin
|
||||
include("test_elasticity_2d_residual.jl")
|
||||
end
|
||||
@testset "test_elasticity_3d_linear_with_surface_load.jl" begin
|
||||
include("test_elasticity_3d_linear_with_surface_load.jl")
|
||||
end
|
||||
@testset "test_elasticity_3d_nonlinear_with_surface_load.jl" begin
|
||||
include("test_elasticity_3d_nonlinear_with_surface_load.jl")
|
||||
end
|
||||
@testset "test_elasticity_3d_unit_block.jl" begin
|
||||
include("test_elasticity_3d_unit_block.jl")
|
||||
end
|
||||
@testset "test_elasticity_forwarddiff.jl" begin
|
||||
include("test_elasticity_forwarddiff.jl")
|
||||
end
|
||||
@testset "test_elasticity_hollow_sphere_with_surface_pressure.jl" begin
|
||||
include("test_elasticity_hollow_sphere_with_surface_pressure.jl")
|
||||
end
|
||||
@testset "test_elasticity_med_pyr5_point_load.jl" begin
|
||||
include("test_elasticity_med_pyr5_point_load.jl")
|
||||
end
|
||||
@testset "test_elasticity_plane_strain.jl" begin
|
||||
include("test_elasticity_plane_strain.jl")
|
||||
end
|
||||
@testset "test_elasticity_pyr5_point_load.jl" begin
|
||||
include("test_elasticity_pyr5_point_load.jl")
|
||||
end
|
||||
@testset "test_elasticity_tet4_stiffness_matrix.jl" begin
|
||||
include("test_elasticity_tet4_stiffness_matrix.jl")
|
||||
end
|
||||
@testset "test_elasticity_tet10_mass_matrix.jl" begin
|
||||
include("test_elasticity_tet10_mass_matrix.jl")
|
||||
end
|
||||
@testset "test_elasticity_tet10_stiffness_matrix.jl" begin
|
||||
include("test_elasticity_tet10_stiffness_matrix.jl")
|
||||
end
|
||||
@testset "test_elasticity_tetra.jl" begin
|
||||
include("test_elasticity_tetra.jl")
|
||||
end
|
||||
@testset "test_elasticplastic_2d_nonhomogenious_boundary_conditions.jl" begin
|
||||
include("test_elasticplastic_2d_nonhomogenious_boundary_conditions.jl")
|
||||
end
|
||||
@testset "test_elasticplastic_3d_linear_with_surface_load.jl" begin
|
||||
include("test_elasticplastic_3d_linear_with_surface_load.jl")
|
||||
end
|
||||
@testset "test_heat_2d_one_element.jl" begin
|
||||
include("test_heat_2d_one_element.jl")
|
||||
end
|
||||
@testset "test_heat_3d.jl" begin
|
||||
include("test_heat_3d.jl")
|
||||
end
|
||||
@testset "test_heat_tet10_convection.jl" begin
|
||||
include("test_heat_tet10_convection.jl")
|
||||
end
|
||||
@testset "test_heat_3d_2.jl" begin
|
||||
include("test_heat_3d_2.jl")
|
||||
end
|
||||
@testset "test_heat.jl" begin
|
||||
include("test_heat.jl")
|
||||
end
|
||||
@testset "test_heat_2.jl" begin
|
||||
include("test_heat_2.jl")
|
||||
end
|
||||
@testset "test_heat_3.jl" begin
|
||||
include("test_heat_3.jl")
|
||||
end
|
||||
@testset "test_heat_3d_two_rings.jl" begin
|
||||
include("test_heat_3d_two_rings.jl")
|
||||
end
|
||||
@testset "test_heat_4.jl" begin
|
||||
include("test_heat_4.jl")
|
||||
end
|
||||
@testset "test_modal_analysis.jl" begin
|
||||
include("test_modal_analysis.jl")
|
||||
end
|
||||
@testset "test_modal_analysis_elasticity.jl" begin
|
||||
include("test_modal_analysis_elasticity.jl")
|
||||
end
|
||||
@testset "test_modal_analysis_elasticity_2.jl" begin
|
||||
include("test_modal_analysis_elasticity_2.jl")
|
||||
end
|
||||
@testset "test_modal_analysis_zero_eigenmodes.jl" begin
|
||||
include("test_modal_analysis_zero_eigenmodes.jl")
|
||||
end
|
||||
@testset "test_mortar.jl" begin
|
||||
include("test_mortar.jl")
|
||||
end
|
||||
@testset "test_mortar_2d.jl" begin
|
||||
include("test_mortar_2d.jl")
|
||||
end
|
||||
@testset "test_mortar_2d_assembly.jl" begin
|
||||
include("test_mortar_2d.jl")
|
||||
end
|
||||
@testset "test_mortar_2d_contact.jl" begin
|
||||
include("test_mortar_2d_contact.jl")
|
||||
end
|
||||
@testset "test_mortar_2d_mesh_tie.jl" begin
|
||||
include("test_mortar_2d_mesh_tie.jl")
|
||||
end
|
||||
@testset "test_mortar_2d_weighted_gap.jl" begin
|
||||
include("test_mortar_2d_weighted_gap.jl")
|
||||
end
|
||||
@testset "test_mortar_3d_mesh_tie_modal.jl" begin
|
||||
include("test_mortar_3d_mesh_tie_modal.jl")
|
||||
end
|
||||
@testset "test_mortar_3d_mesh_tie_two_rings.jl" begin
|
||||
include("test_mortar_3d_mesh_tie_two_rings.jl")
|
||||
end
|
||||
@testset "test_mortar_3d_polygon_clip.jl" begin
|
||||
include("test_mortar_3d_polygon_clip.jl")
|
||||
end
|
||||
@testset "test_postprocess.jl" begin
|
||||
include("test_postprocess.jl")
|
||||
end
|
||||
@testset "test_potential_energy.jl" begin
|
||||
include("test_potential_energy.jl")
|
||||
end
|
||||
@testset "test_problems_contact_3d.jl" begin
|
||||
include("test_problems_contact_3d.jl")
|
||||
end
|
||||
@testset "test_problems_elasticity.jl" begin
|
||||
include("test_problems_elasticity.jl")
|
||||
end
|
||||
@testset "test_problems_mortar_3d.jl" begin
|
||||
include("test_problems_mortar_3d.jl")
|
||||
end
|
||||
@testset "test_problems_mortar_3d_lowlevel.jl" begin
|
||||
include("test_problems_mortar_3d_lowlevel.jl")
|
||||
end
|
||||
@testset "test_solvers_postprocess.jl" begin
|
||||
include("test_solvers_postprocess.jl")
|
||||
end
|
||||
@testset "test_virtual_work.jl" begin
|
||||
include("test_virtual_work.jl")
|
||||
end
|
||||
@testset "test_von_mises_material.jl" begin
|
||||
include("test_von_mises_material.jl")
|
||||
end
|
||||
end
|
||||
println()
|
||||
println("Test statistics:")
|
||||
println(to)
|
||||
|
||||
include("../docs/deploy.jl")
|
||||
|
||||
Reference in New Issue
Block a user