diff --git a/Project.toml b/Project.toml index c2e3281..5a37c25 100644 --- a/Project.toml +++ b/Project.toml @@ -21,11 +21,13 @@ DiscreteMeasures = "0.1" OUQBase = "0.1" Reexport = "1.2.2" SafeTestsets = "0.1" +SciMLTesting = "1" [extras] 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 = ["Pkg", "SafeTestsets", "Test"] +test = ["Pkg", "SafeTestsets", "SciMLTesting", "Test"] diff --git a/test/runtests.jl b/test/runtests.jl index 4f9fe49..e6cf689 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ using Pkg using SafeTestsets, Test +using SciMLTesting const GROUP = get(ENV, "GROUP", "All") @@ -9,19 +10,7 @@ const GROUP = get(ENV, "GROUP", "All") # "{sublibrary}_{TEST_GROUP}" for any custom group (e.g., QA, GPU, etc.). # Sublibraries declare their groups in test/test_groups.toml. lib_dir = joinpath(dirname(@__DIR__), "lib") - - # Check if GROUP matches a sublibrary, possibly with a _SUFFIX for the test group. - # Scan underscores right-to-left to find the longest matching sublibrary prefix. - function _detect_sublibrary_group(group, lib_dir) - isdir(joinpath(lib_dir, group)) && return (group, "Core") - for i in length(group):-1:1 - if group[i] == '_' && isdir(joinpath(lib_dir, group[1:(i - 1)])) - return (group[1:(i - 1)], group[(i + 1):end]) - end - end - return (group, "Core") - end - base_group, test_group = _detect_sublibrary_group(GROUP, lib_dir) + base_group, test_group = detect_sublibrary_group(GROUP, lib_dir) if isdir(joinpath(lib_dir, base_group)) Pkg.activate(joinpath(lib_dir, base_group)) @@ -65,6 +54,6 @@ const GROUP = get(ENV, "GROUP", "All") Pkg.test(base_group, julia_args = ["--check-bounds=auto", "--compiled-modules=yes", "--depwarn=yes"], force_latest_compatible_version = false, allow_reresolve = true) end elseif GROUP == "All" || GROUP == "Core" - @time @safetestset "Umbrella Load" include("Core/umbrella_load.jl") + run_tests(; core = () -> @safetestset("Umbrella Load", include("umbrella_load.jl"))) end end # @time diff --git a/test/Core/umbrella_load.jl b/test/umbrella_load.jl similarity index 100% rename from test/Core/umbrella_load.jl rename to test/umbrella_load.jl