From a4139bbe90741d0c5734ed86e4a2107ffece9f8b Mon Sep 17 00:00:00 2001 From: Sathvik Bhagavan Date: Wed, 20 Sep 2023 12:12:05 +0000 Subject: [PATCH] test: wrap testsets into one testset This is to ensure all testsets run even if one fails as they are independent --- test/runtests.jl | 54 +++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 08e80ab7..25abaf60 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,28 +8,34 @@ function dev_subpkg(subpkg) subpkg_path = joinpath(dirname(@__DIR__), "lib", subpkg) Pkg.develop(PackageSpec(path = subpkg_path)) end -for pkg in [ - "SurrogatesAbstractGPs", "SurrogatesFlux", - "SurrogatesPolyChaos", "SurrogatesMOE", - "SurrogatesRandomForest", "SurrogatesSVM"] - @time begin - dev_subpkg(pkg) - Pkg.test(pkg) - end -end -@time @safetestset "GEKPLS.jl" begin include("GEKPLS.jl") end -@time @safetestset "Radials.jl" begin include("Radials.jl") end -@time @safetestset "Kriging.jl" begin include("Kriging.jl") end -@time @safetestset "Sampling" begin include("sampling.jl") end -@time @safetestset "Optimization" begin include("optimization.jl") end -@time @safetestset "LinearSurrogate" begin include("linearSurrogate.jl") end -@time @safetestset "Lobachevsky" begin include("lobachevsky.jl") end -@time @safetestset "InverseDistanceSurrogate" begin include("inverseDistanceSurrogate.jl") end -@time @safetestset "SecondOrderPolynomialSurrogate" begin include("secondOrderPolynomialSurrogate.jl") end -# @time @safetestset "AD_Compatibility" begin include("AD_compatibility.jl") end -@time @safetestset "Wendland" begin include("Wendland.jl") end -@time @safetestset "VariableFidelity" begin include("VariableFidelity.jl") end -@time @safetestset "Earth" begin include("earth.jl") end -@time @safetestset "Gradient Enhanced Kriging" begin include("GEK.jl") end -@time @safetestset "Section Samplers" begin include("SectionSampleTests.jl") end +@testset "Surrogates" begin + @testset "Libs" begin + @testset "$pkg" for pkg in [ + "SurrogatesAbstractGPs", "SurrogatesFlux", + "SurrogatesPolyChaos", "SurrogatesMOE", + "SurrogatesRandomForest", "SurrogatesSVM"] + @time begin + dev_subpkg(pkg) + Pkg.test(pkg) + end + end + end + @testset "Algorithms" begin + @time @safetestset "GEKPLS" begin include("GEKPLS.jl") end + @time @safetestset "Radials" begin include("Radials.jl") end + @time @safetestset "Kriging" begin include("Kriging.jl") end + @time @safetestset "Sampling" begin include("sampling.jl") end + @time @safetestset "Optimization" begin include("optimization.jl") end + @time @safetestset "LinearSurrogate" begin include("linearSurrogate.jl") end + @time @safetestset "Lobachevsky" begin include("lobachevsky.jl") end + @time @safetestset "InverseDistanceSurrogate" begin include("inverseDistanceSurrogate.jl") end + @time @safetestset "SecondOrderPolynomialSurrogate" begin include("secondOrderPolynomialSurrogate.jl") end + # @time @safetestset "AD_Compatibility" begin include("AD_compatibility.jl") end + @time @safetestset "Wendland" begin include("Wendland.jl") end + @time @safetestset "VariableFidelity" begin include("VariableFidelity.jl") end + @time @safetestset "Earth" begin include("earth.jl") end + @time @safetestset "Gradient Enhanced Kriging" begin include("GEK.jl") end + @time @safetestset "Section Samplers" begin include("SectionSampleTests.jl") end + end +end \ No newline at end of file