Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
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"

Expand All @@ -29,4 +31,6 @@ EnzymeTestUtils = "0.2.4"
FiniteDifferences = "0.12.34"
ForwardDiff = "1.4.0"
Plots = "1.41.6"
SafeTestsets = "0.0.1, 0.1"
SciMLTesting = "1"
StaticArrays = "1.9.18"
5 changes: 5 additions & 0 deletions test/qa/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Expand All @@ -15,4 +17,7 @@ Aqua = "0.8"
Distributions = "0.25.126"
ExplicitImports = "1"
JET = "0.9, 0.10, 0.11"
SafeTestsets = "0.0.1, 0.1"
SciMLTesting = "1"
Test = "1"
julia = "1.10"
110 changes: 80 additions & 30 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,40 +1,90 @@
using Pkg
using Test
using SafeTestsets, Test
using SciMLTesting

const GROUP = get(ENV, "GROUP", "All")

if GROUP == "QA"
# The QA env is activated and the root package developed into it explicitly (rather
# than via `run_tests`'s `env =` group spec) so the activate/develop/instantiate
# sequence — and the bare `include` of qa.jl into the runtests module — stays
# byte-for-byte identical to the previous hand-written runtests.jl.
function qa_group()
Pkg.activate(joinpath(@__DIR__, "qa"))
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
Pkg.develop(Pkg.PackageSpec(path = dirname(@__DIR__)))
Pkg.instantiate()
include(joinpath(@__DIR__, "qa", "qa.jl"))
return include(joinpath(@__DIR__, "qa", "qa.jl"))
end

if GROUP == "All" || GROUP == "Core"
using DifferenceEquations
using Distributions
using LinearAlgebra
using Random

include("linear_direct_iteration.jl")
include("kalman.jl")
include("direct_iteration.jl")
include("quadratic_direct_iteration.jl")
include("static_arrays.jl")
include("cache_reuse.jl")
include("sciml_interfaces.jl")
include("sensitivity_interface.jl")
include("linear_direct_iteration_forwarddiff.jl")
include("kalman_forwarddiff.jl")
include("conditional_likelihood.jl")
include("conditional_likelihood_forwarddiff.jl")
include("save_everystep.jl")
# Core test group. The previous runtests.jl ran these files for GROUP=All and
# GROUP=Core, with the five Enzyme/gradient files gated behind `CI != "true"` (they
# are skipped on CI). That CI guard cannot be expressed by folder-discovery — which
# would run every file in the group unconditionally — so the group is wired as an
# explicit `run_tests` `core` thunk that keeps the guard verbatim. Each file is run
# in its own `@safetestset` module (it is self-contained, carrying its own `using`s).
function core_group()
@safetestset "Linear DirectIteration" begin
include("linear_direct_iteration.jl")
end
@safetestset "Kalman" begin
include("kalman.jl")
end
@safetestset "DirectIteration (generic + quadratic)" begin
include("direct_iteration.jl")
end
@safetestset "Quadratic DirectIteration" begin
include("quadratic_direct_iteration.jl")
end
@safetestset "StaticArrays" begin
include("static_arrays.jl")
end
@safetestset "Cache reuse" begin
include("cache_reuse.jl")
end
@safetestset "SciML interfaces" begin
include("sciml_interfaces.jl")
end
@safetestset "Sensitivity interface" begin
include("sensitivity_interface.jl")
end
@safetestset "Linear DirectIteration ForwardDiff" begin
include("linear_direct_iteration_forwarddiff.jl")
end
@safetestset "Kalman ForwardDiff" begin
include("kalman_forwarddiff.jl")
end
@safetestset "ConditionalLikelihood" begin
include("conditional_likelihood.jl")
end
@safetestset "ConditionalLikelihood ForwardDiff" begin
include("conditional_likelihood_forwarddiff.jl")
end
@safetestset "save_everystep" begin
include("save_everystep.jl")
end

if get(ENV, "CI", "false") != "true"
include("gradient_comparison.jl")
include("linear_direct_iteration_enzyme.jl")
include("quadratic_direct_iteration_enzyme.jl")
include("kalman_enzyme.jl")
include("conditional_likelihood_enzyme.jl")
@safetestset "Gradient comparison" begin
include("gradient_comparison.jl")
end
@safetestset "Linear DirectIteration Enzyme" begin
include("linear_direct_iteration_enzyme.jl")
end
@safetestset "Quadratic DirectIteration Enzyme" begin
include("quadratic_direct_iteration_enzyme.jl")
end
@safetestset "Kalman Enzyme" begin
include("kalman_enzyme.jl")
end
@safetestset "ConditionalLikelihood Enzyme" begin
include("conditional_likelihood_enzyme.jl")
end
end
return nothing
end

# The previous runtests.jl ran the Core block (not QA) for GROUP=All, so "All" is
# curated to ["Core"]: GROUP=All and GROUP=Core both run the Core body, and QA runs
# only for GROUP=QA.
run_tests(;
core = core_group,
qa = qa_group,
all = ["Core"],
)
Loading