Skip to content

Commit f29a694

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Use SciMLTesting v1.2 folder-based run_tests (#316)
Convert test/runtests.jl to the SciMLTesting v1.2 folder-discovery model: the whole GROUP dispatch ladder collapses to `run_tests()`, with test files discovered from folders matching test_groups.toml (Core = top-level test/*.jl, QA = test/qa/, NoPre = test/nopre/). - Move qa.jl into test/qa/ so the Core glob (all top-level *.jl) does not run it. QA has no Project.toml, so it runs in the root test env as before. - NoPre keeps its sub-env (test/nopre/Project.toml); folder-discovery activates it and develops the package root, matching the old explicit Pkg.develop. - Preserve the NoPre prerelease gate: GROUP=NoPre runs nothing on prerelease Julia (the original `&& isempty(VERSION.prerelease)`), while "All" globs NoPre unconditionally as before. Wrapped around the bare run_tests(). - Add SciMLTesting + SafeTestsets to the root test deps and to the NoPre sub-env Project.toml; drop Pkg (only the old harness used it). The exact set of files run under each GROUP value (All/Core/QA/NoPre) is unchanged. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d863f07 commit f29a694

4 files changed

Lines changed: 22 additions & 84 deletions

File tree

Project.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ OrdinaryDiffEqNonlinearSolve = "1.5.0, 2"
4242
OrdinaryDiffEqRosenbrock = "1.8.0, 2"
4343
OrdinaryDiffEqTsit5 = "1.1.0, 2"
4444
OrdinaryDiffEqVerner = "1.1.1, 2"
45-
Pkg = "1.10.0"
4645
PrecompileTools = "1.2.1"
4746
QuadGK = "2.9"
4847
RecipesBase = "1.3.4"
4948
RecursiveArrayTools = "3.36, 4"
49+
SafeTestsets = "0.0.1, 0.1, 1"
5050
SciMLBase = "2.146, 3.1"
51+
SciMLTesting = "1"
5152
StaticArrays = "1.9.7"
5253
StaticArraysCore = "1.4.3"
5354
Sundials = "4.19.2"
@@ -68,11 +69,12 @@ OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
6869
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
6970
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
7071
OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2"
71-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
7272
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
73+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
74+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
7375
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
7476
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
7577
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7678

7779
[targets]
78-
test = ["ADTypes", "Aqua", "DataInterpolations", "ForwardDiff", "Pkg", "NonlinearSolve", "ODEProblemLibrary", "OrdinaryDiffEqBDF", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqVerner", "QuadGK", "StaticArrays", "Test", "Functors"]
80+
test = ["ADTypes", "Aqua", "DataInterpolations", "ForwardDiff", "NonlinearSolve", "ODEProblemLibrary", "OrdinaryDiffEqBDF", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqVerner", "QuadGK", "SafeTestsets", "SciMLTesting", "StaticArrays", "Test", "Functors"]

test/nopre/Project.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
88
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
99
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
1010
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
11+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1112
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
13+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
1214
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1315
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
1416
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
1517

18+
[sources]
19+
DiffEqCallbacks = {path = "../.."}
20+
1621
[compat]
1722
ComponentArrays = "0.15.18"
1823
ForwardDiff = "0.10.36"
@@ -22,6 +27,9 @@ JLArrays = "0.1, 0.2"
2227
OrdinaryDiffEqLowOrderRK = "2"
2328
OrdinaryDiffEqTsit5 = "2"
2429
QuadGK = "2.9"
30+
SafeTestsets = "0.0.1, 0.1, 1"
2531
SciMLSensitivity = "7.105"
32+
SciMLTesting = "1"
33+
Test = "1"
2634
Tracker = "0.2.35"
2735
Zygote = "0.6.69, 0.7"
File renamed without changes.

test/runtests.jl

Lines changed: 9 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,11 @@
1-
using DiffEqCallbacks
2-
import Functors
3-
using Test
4-
const GROUP = get(ENV, "GROUP", "All")
1+
using SciMLTesting
52

6-
# write your own tests here
7-
@time @testset "DiffEqCallbacks" begin
8-
if GROUP == "QA"
9-
@time @testset "Quality Assurance" begin
10-
include("qa.jl")
11-
end
12-
end
13-
14-
if GROUP == "All" || GROUP == "Core"
15-
@time @testset "AutoAbstol" begin
16-
include("autoabstol_tests.jl")
17-
end
18-
@time @testset "TerminateSteadyState tests" begin
19-
include("terminatesteadystate_test.jl")
20-
end
21-
@time @testset "StepsizeLimiter tests" begin
22-
include("stepsizelimiter_tests.jl")
23-
end
24-
@time @testset "Function Calling tests" begin
25-
include("funccall_tests.jl")
26-
end
27-
@time @testset "IndependentlyLinearized tests" begin
28-
include("independentlylinearizedtests.jl")
29-
end
30-
@time @testset "PresetTime tests" begin
31-
include("preset_time.jl")
32-
end
33-
@time @testset "Iterative tests" begin
34-
include("iterative_tests.jl")
35-
end
36-
@time @testset "Periodic tests" begin
37-
include("periodic_tests.jl")
38-
end
39-
@time @testset "Manifold tests" begin
40-
include("manifold_tests.jl")
41-
end
42-
@time @testset "Domain tests" begin
43-
include("domain_tests.jl")
44-
end
45-
@time @testset "ProbInts tests" begin
46-
include("probints.jl")
47-
end
48-
@time @testset "Integrating tests" begin
49-
include("integrating_tests.jl")
50-
end
51-
@time @testset "Integrating sum tests" begin
52-
include("integrating_sum_tests.jl")
53-
end
54-
@time @testset "Integrating GK tests" begin
55-
include("integrating_GK_tests.jl")
56-
end
57-
@time @testset "Integrating GK Sum tests" begin
58-
include("integrating_GK_sum_tests.jl")
59-
end
60-
@time @testset "Saving tests" begin
61-
include("saving_tests.jl")
62-
end
63-
end
64-
65-
if GROUP == "All" || GROUP == "NoPre" && isempty(VERSION.prerelease)
66-
import Pkg
67-
Pkg.activate("nopre")
68-
Pkg.develop(Pkg.PackageSpec(path = dirname(@__DIR__)))
69-
Pkg.instantiate()
70-
@time @testset "JET tests" begin
71-
include("nopre/jet_tests.jl")
72-
end
73-
@time @testset "Integrating Sensitivity tests" begin
74-
include("nopre/integrating_sensitivity_tests.jl")
75-
end
76-
@time @testset "Integrating Sum Sensitivity tests" begin
77-
include("nopre/integrating_sum_sensitivity_tests.jl")
78-
end
79-
@time @testset "Saving Tracker tests" begin
80-
include("nopre/saving_tracker_tests.jl")
81-
end
82-
end
3+
# The NoPre group is selectable by name only on non-prerelease Julia (the original
4+
# `GROUP == "NoPre" && isempty(VERSION.prerelease)` gate). Under "All" the NoPre
5+
# folder always ran regardless of prerelease, and folder-discovery's "All" globs the
6+
# NoPre folder unconditionally, so "All" is unaffected by this guard.
7+
if current_group() == "NoPre" && !isempty(VERSION.prerelease)
8+
# prerelease Julia: GROUP=NoPre runs nothing, matching the original gate.
9+
else
10+
run_tests()
8311
end

0 commit comments

Comments
 (0)