From a4c37cf9277095610d5d426f14d03eabb0d73ea2 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 13 Jun 2026 07:37:00 -0400 Subject: [PATCH] Use SciMLTesting v1.0.0 (run_tests harness) Replace the hand-written GROUP-dispatch in test/runtests.jl with a single declarative SciMLTesting.run_tests call. Behavior-equivalent refactor: same group routing (Core/All and the per-repo named/QA groups), same test bodies. Add SciMLTesting to the test deps; drop Pkg from the test deps where it was only used by the old activate/develop/instantiate harness. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 6 +++--- test/runtests.jl | 43 +++++++++++++------------------------------ 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/Project.toml b/Project.toml index 6016219a..adabfa9c 100644 --- a/Project.toml +++ b/Project.toml @@ -29,11 +29,11 @@ ForwardDiff = "0.10.13" GPUArraysCore = "0.1, 0.2" GenericSchur = "0.5.3" LinearAlgebra = "1.10" -Pkg = "1" PrecompileTools = "1" Printf = "1.10" Random = "1" SafeTestsets = "0.1" +SciMLTesting = "1" SparseArrays = "1.10" StaticArrays = "1.9.8" Test = "1" @@ -43,11 +43,11 @@ julia = "1.10" Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "DoubleFloats", "ForwardDiff", "Pkg", "Test", "SafeTestsets", "StaticArrays", "Random"] +test = ["Aqua", "DoubleFloats", "ForwardDiff", "Test", "SafeTestsets", "SciMLTesting", "StaticArrays", "Random"] diff --git a/test/runtests.jl b/test/runtests.jl index 68fc7ea6..1af6a122 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,34 +1,17 @@ -using Pkg using SafeTestsets, Test -const LONGER_TESTS = false +using SciMLTesting -const GROUP = get(ENV, "GROUP", "All") - -function activate_gpu_env() - Pkg.activate("gpu") - Pkg.develop(PackageSpec(path = dirname(@__DIR__))) - return Pkg.instantiate() -end - -function activate_jet_env() - Pkg.activate("jet") - Pkg.develop(PackageSpec(path = dirname(@__DIR__))) - return Pkg.instantiate() -end - -@time begin - if GROUP == "All" || GROUP == "Core" +run_tests(; + core = () -> begin @time @safetestset "Quality Assurance" include("qa.jl") @time @safetestset "Basic Tests" include("basictests.jl") - end - - if GROUP == "GPU" - activate_gpu_env() - @time @safetestset "GPU Tests" include("gpu/gputests.jl") - end - - if GROUP == "JET" - activate_jet_env() - @time @safetestset "JET Tests" include("jet/jet.jl") - end -end + end, + groups = Dict( + "GPU" => (; env = joinpath(@__DIR__, "gpu"), body = () -> begin + @time @safetestset "GPU Tests" include("gpu/gputests.jl") + end), + "JET" => (; env = joinpath(@__DIR__, "jet"), body = () -> begin + @time @safetestset "JET Tests" include("jet/jet.jl") + end), + ), +)