diff --git a/Project.toml b/Project.toml index 2d36175..0c333df 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,8 @@ OrdinaryDiffEq = "7" ParserCombinator = "2" Pkg = "1" PythonCall = "0.9.29" -SafeTestsets = "0.1" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" Test = "1.10" julia = "1.10" @@ -32,7 +33,8 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Pkg", "SafeTestsets", "OrdinaryDiffEq", "Test"] +test = ["Aqua", "Pkg", "SafeTestsets", "SciMLTesting", "OrdinaryDiffEq", "Test"] diff --git a/test/nopre/Project.toml b/test/NoPre/Project.toml similarity index 56% rename from test/nopre/Project.toml rename to test/NoPre/Project.toml index 7b9f67d..2bea051 100644 --- a/test/nopre/Project.toml +++ b/test/NoPre/Project.toml @@ -2,9 +2,16 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" BaseModelica = "a17d5099-185d-4ff5-b5d3-51aa4569e56d" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +[sources] +BaseModelica = {path = "../.."} + [compat] Aqua = "0.8" JET = "0.9, 0.11.2" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" julia = "1.10" diff --git a/test/qa.jl b/test/NoPre/qa.jl similarity index 100% rename from test/qa.jl rename to test/NoPre/qa.jl diff --git a/test/test_jet.jl b/test/NoPre/test_jet.jl similarity index 100% rename from test/test_jet.jl rename to test/NoPre/test_jet.jl diff --git a/test/runtests.jl b/test/runtests.jl index 93236f6..6869267 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,29 +1,31 @@ -using Pkg, Test, SafeTestsets +using Pkg +using SafeTestsets +using SciMLTesting -const GROUP = get(ENV, "GROUP", "All") - -if (GROUP == "NoPre" || GROUP == "Quality") && isempty(VERSION.prerelease) - Pkg.activate(joinpath(@__DIR__, "nopre")) +# The NoPre group runs Aqua/JET in the test/NoPre sub-env, but only on a non-prerelease +# Julia: those tools produce spurious reports on prerelease builds, so the whole group +# (env activation included) is a no-op on a `pre` matrix entry. A folder-discovery body +# cannot express this guard, so NoPre stays an explicit thunk. "Quality" is a legacy +# alias for NoPre. +function nopre_group() + isempty(VERSION.prerelease) || return nothing + Pkg.activate(joinpath(@__DIR__, "NoPre")) Pkg.develop(PackageSpec(path = dirname(@__DIR__))) Pkg.instantiate() - @testset "Quality Assurance" begin - @safetestset "Quality Assurance" include("qa.jl") - @safetestset "JET Static Analysis" include("test_jet.jl") - end + @safetestset "Quality Assurance" include(joinpath(@__DIR__, "NoPre", "qa.jl")) + @safetestset "JET Static Analysis" include(joinpath(@__DIR__, "NoPre", "test_jet.jl")) + return nothing end -if GROUP == "All" || GROUP == "Core" - @testset "BaseModelica" begin - @safetestset "Julia Parser Tests" begin - include("test_julia_parser.jl") - end - - @safetestset "ANTLR Parser Tests" begin - include("test_antlr_parser.jl") - end - - @safetestset "Error Message Tests" begin - include("test_error_messages.jl") - end - end -end +run_tests(; + core = function () + @safetestset "Julia Parser Tests" include("test_julia_parser.jl") + @safetestset "ANTLR Parser Tests" include("test_antlr_parser.jl") + return @safetestset "Error Message Tests" include("test_error_messages.jl") + end, + groups = Dict("NoPre" => nopre_group), + umbrellas = Dict("Quality" => ["NoPre"]), + # Original runtests ran NoPre/Quality only for those explicit GROUPs, never under + # "All"; curate "All" to Core only to preserve that. + all = ["Core"], +)