diff --git a/Project.toml b/Project.toml index bdc802f8be0..9239b560fa1 100644 --- a/Project.toml +++ b/Project.toml @@ -64,6 +64,7 @@ OrdinaryDiffEqTsit5 = "2" OrdinaryDiffEqVerner = "2" SciMLBase = "3" SciMLLogging = "2.0.0" +SciMLTesting = "1" julia = "1.10" [extras] @@ -117,6 +118,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" @@ -129,4 +131,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [targets] -test = ["ADTypes", "ArrayInterface", "ComponentArrays", "AlgebraicMultigrid", "DiffEqBase", "DiffEqCallbacks", "DifferentiationInterface", "DiffEqDevTools", "ExplicitImports", "ForwardDiff", "IncompleteLU", "InteractiveUtils", "LinearAlgebra", "LinearSolve", "ODEProblemLibrary", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExplicitTableaus", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "NLsolve", "NonlinearSolve", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "ElasticArrays", "JLArrays", "Random", "SafeTestsets", "StableRNGs", "StructArrays", "Test", "Unitful", "Pkg", "RecursiveArrayTools", "RecursiveFactorization", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings", "StaticArrays", "Statistics"] +test = ["ADTypes", "ArrayInterface", "ComponentArrays", "AlgebraicMultigrid", "DiffEqBase", "DiffEqCallbacks", "DifferentiationInterface", "DiffEqDevTools", "ExplicitImports", "ForwardDiff", "IncompleteLU", "InteractiveUtils", "LinearAlgebra", "LinearSolve", "ODEProblemLibrary", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExplicitTableaus", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "NLsolve", "NonlinearSolve", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "ElasticArrays", "JLArrays", "Random", "SafeTestsets", "SciMLTesting", "StableRNGs", "StructArrays", "Test", "Unitful", "Pkg", "RecursiveArrayTools", "RecursiveFactorization", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings", "StaticArrays", "Statistics"] diff --git a/test/ad/Project.toml b/test/AD/Project.toml similarity index 91% rename from test/ad/Project.toml rename to test/AD/Project.toml index e449e3e6d83..6c8bd8f695c 100644 --- a/test/ad/Project.toml +++ b/test/AD/Project.toml @@ -15,8 +15,11 @@ OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [sources] @@ -47,6 +50,8 @@ OrdinaryDiffEqLowOrderRK = "2" OrdinaryDiffEqRosenbrock = "2" OrdinaryDiffEqSDIRK = "2" OrdinaryDiffEqTsit5 = "2" +SafeTestsets = "0.1, 1" SciMLSensitivity = "7.104" +SciMLTesting = "1" StaticArrays = "1" Zygote = "0.6.61, 0.7" diff --git a/test/ad/ad_tests.jl b/test/AD/ad_tests.jl similarity index 100% rename from test/ad/ad_tests.jl rename to test/AD/ad_tests.jl diff --git a/test/ad/autodiff_events.jl b/test/AD/autodiff_events.jl similarity index 100% rename from test/ad/autodiff_events.jl rename to test/AD/autodiff_events.jl diff --git a/test/ad/discrete_adjoints.jl b/test/AD/discrete_adjoints.jl similarity index 100% rename from test/ad/discrete_adjoints.jl rename to test/AD/discrete_adjoints.jl diff --git a/test/algconvergence/non-autonomous_convergence_tests.jl b/test/AlgConvergence_I/non-autonomous_convergence_tests.jl similarity index 100% rename from test/algconvergence/non-autonomous_convergence_tests.jl rename to test/AlgConvergence_I/non-autonomous_convergence_tests.jl diff --git a/test/algconvergence/split_methods_tests.jl b/test/AlgConvergence_III/split_methods_tests.jl similarity index 100% rename from test/algconvergence/split_methods_tests.jl rename to test/AlgConvergence_III/split_methods_tests.jl diff --git a/test/downstream/Project.toml b/test/Downstream/Project.toml similarity index 90% rename from test/downstream/Project.toml rename to test/Downstream/Project.toml index f81542afcee..4ebe7c9103d 100644 --- a/test/downstream/Project.toml +++ b/test/Downstream/Project.toml @@ -13,8 +13,11 @@ OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d" OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] ADTypes = "1.16" @@ -31,6 +34,8 @@ OrdinaryDiffEqLowStorageRK = "3" OrdinaryDiffEqRosenbrock = "2" OrdinaryDiffEqSDIRK = "2" OrdinaryDiffEqSSPRK = "2" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" StaticArrays = "1" StochasticDiffEq = "7" diff --git a/test/downstream/dynamicquantities_measurements.jl b/test/Downstream/dynamicquantities_measurements.jl similarity index 100% rename from test/downstream/dynamicquantities_measurements.jl rename to test/Downstream/dynamicquantities_measurements.jl diff --git a/test/downstream/measurements.jl b/test/Downstream/measurements.jl similarity index 100% rename from test/downstream/measurements.jl rename to test/Downstream/measurements.jl diff --git a/test/downstream/time_derivative_test.jl b/test/Downstream/time_derivative_test.jl similarity index 100% rename from test/downstream/time_derivative_test.jl rename to test/Downstream/time_derivative_test.jl diff --git a/test/integrators/alg_events_tests.jl b/test/Integrators_I/alg_events_tests.jl similarity index 100% rename from test/integrators/alg_events_tests.jl rename to test/Integrators_I/alg_events_tests.jl diff --git a/test/integrators/callback_allocation_tests.jl b/test/Integrators_I/callback_allocation_tests.jl similarity index 100% rename from test/integrators/callback_allocation_tests.jl rename to test/Integrators_I/callback_allocation_tests.jl diff --git a/test/integrators/check_error.jl b/test/Integrators_I/check_error.jl similarity index 100% rename from test/integrators/check_error.jl rename to test/Integrators_I/check_error.jl diff --git a/test/integrators/discrete_callback_dual_test.jl b/test/Integrators_I/discrete_callback_dual_test.jl similarity index 100% rename from test/integrators/discrete_callback_dual_test.jl rename to test/Integrators_I/discrete_callback_dual_test.jl diff --git a/test/integrators/event_detection_tests.jl b/test/Integrators_I/event_detection_tests.jl similarity index 100% rename from test/integrators/event_detection_tests.jl rename to test/Integrators_I/event_detection_tests.jl diff --git a/test/integrators/event_repeat_tests.jl b/test/Integrators_I/event_repeat_tests.jl similarity index 100% rename from test/integrators/event_repeat_tests.jl rename to test/Integrators_I/event_repeat_tests.jl diff --git a/test/integrators/integrator_interface_tests.jl b/test/Integrators_I/integrator_interface_tests.jl similarity index 100% rename from test/integrators/integrator_interface_tests.jl rename to test/Integrators_I/integrator_interface_tests.jl diff --git a/test/integrators/iterator_tests.jl b/test/Integrators_I/iterator_tests.jl similarity index 100% rename from test/integrators/iterator_tests.jl rename to test/Integrators_I/iterator_tests.jl diff --git a/test/integrators/multi_vcc_mask_tests.jl b/test/Integrators_I/multi_vcc_mask_tests.jl similarity index 100% rename from test/integrators/multi_vcc_mask_tests.jl rename to test/Integrators_I/multi_vcc_mask_tests.jl diff --git a/test/integrators/ode_event_tests.jl b/test/Integrators_I/ode_event_tests.jl similarity index 100% rename from test/integrators/ode_event_tests.jl rename to test/Integrators_I/ode_event_tests.jl diff --git a/test/integrators/reinit_test.jl b/test/Integrators_I/reinit_test.jl similarity index 100% rename from test/integrators/reinit_test.jl rename to test/Integrators_I/reinit_test.jl diff --git a/test/integrators/step_limiter_test.jl b/test/Integrators_I/step_limiter_test.jl similarity index 100% rename from test/integrators/step_limiter_test.jl rename to test/Integrators_I/step_limiter_test.jl diff --git a/test/integrators/diffdir_tests.jl b/test/Integrators_II/diffdir_tests.jl similarity index 100% rename from test/integrators/diffdir_tests.jl rename to test/Integrators_II/diffdir_tests.jl diff --git a/test/integrators/integrator_rng_tests.jl b/test/Integrators_II/integrator_rng_tests.jl similarity index 100% rename from test/integrators/integrator_rng_tests.jl rename to test/Integrators_II/integrator_rng_tests.jl diff --git a/test/integrators/ode_add_steps_tests.jl b/test/Integrators_II/ode_add_steps_tests.jl similarity index 100% rename from test/integrators/ode_add_steps_tests.jl rename to test/Integrators_II/ode_add_steps_tests.jl diff --git a/test/integrators/ode_cache_tests.jl b/test/Integrators_II/ode_cache_tests.jl similarity index 100% rename from test/integrators/ode_cache_tests.jl rename to test/Integrators_II/ode_cache_tests.jl diff --git a/test/integrators/resize_tests.jl b/test/Integrators_II/resize_tests.jl similarity index 100% rename from test/integrators/resize_tests.jl rename to test/Integrators_II/resize_tests.jl diff --git a/test/integrators/rev_events_tests.jl b/test/Integrators_II/rev_events_tests.jl similarity index 100% rename from test/integrators/rev_events_tests.jl rename to test/Integrators_II/rev_events_tests.jl diff --git a/test/integrators/split_ode_tests.jl b/test/Integrators_II/split_ode_tests.jl similarity index 100% rename from test/integrators/split_ode_tests.jl rename to test/Integrators_II/split_ode_tests.jl diff --git a/test/interface/algebraic_interpolation.jl b/test/InterfaceI/algebraic_interpolation.jl similarity index 100% rename from test/interface/algebraic_interpolation.jl rename to test/InterfaceI/algebraic_interpolation.jl diff --git a/test/interface/aliasing_tests.jl b/test/InterfaceI/aliasing_tests.jl similarity index 100% rename from test/interface/aliasing_tests.jl rename to test/InterfaceI/aliasing_tests.jl diff --git a/test/interface/complex_tests.jl b/test/InterfaceI/complex_tests.jl similarity index 100% rename from test/interface/complex_tests.jl rename to test/InterfaceI/complex_tests.jl diff --git a/test/interface/composite_algorithm_test.jl b/test/InterfaceI/composite_algorithm_test.jl similarity index 100% rename from test/interface/composite_algorithm_test.jl rename to test/InterfaceI/composite_algorithm_test.jl diff --git a/test/interface/composite_interpolation.jl b/test/InterfaceI/composite_interpolation.jl similarity index 100% rename from test/interface/composite_interpolation.jl rename to test/InterfaceI/composite_interpolation.jl diff --git a/test/interface/controllers.jl b/test/InterfaceI/controllers.jl similarity index 100% rename from test/interface/controllers.jl rename to test/InterfaceI/controllers.jl diff --git a/test/interface/derivative_discontinuity_test.jl b/test/InterfaceI/derivative_discontinuity_test.jl similarity index 100% rename from test/interface/derivative_discontinuity_test.jl rename to test/InterfaceI/derivative_discontinuity_test.jl diff --git a/test/interface/export_tests.jl b/test/InterfaceI/export_tests.jl similarity index 100% rename from test/interface/export_tests.jl rename to test/InterfaceI/export_tests.jl diff --git a/test/interface/inf_handling.jl b/test/InterfaceI/inf_handling.jl similarity index 100% rename from test/interface/inf_handling.jl rename to test/InterfaceI/inf_handling.jl diff --git a/test/interface/inplace_interpolation.jl b/test/InterfaceI/inplace_interpolation.jl similarity index 100% rename from test/interface/inplace_interpolation.jl rename to test/InterfaceI/inplace_interpolation.jl diff --git a/test/interface/interpolation_output_types.jl b/test/InterfaceI/interpolation_output_types.jl similarity index 100% rename from test/interface/interpolation_output_types.jl rename to test/InterfaceI/interpolation_output_types.jl diff --git a/test/interface/null_u0_callbacks_test.jl b/test/InterfaceI/null_u0_callbacks_test.jl similarity index 100% rename from test/interface/null_u0_callbacks_test.jl rename to test/InterfaceI/null_u0_callbacks_test.jl diff --git a/test/interface/ode_backwards_test.jl b/test/InterfaceI/ode_backwards_test.jl similarity index 100% rename from test/interface/ode_backwards_test.jl rename to test/InterfaceI/ode_backwards_test.jl diff --git a/test/interface/ode_initdt_tests.jl b/test/InterfaceI/ode_initdt_tests.jl similarity index 100% rename from test/interface/ode_initdt_tests.jl rename to test/InterfaceI/ode_initdt_tests.jl diff --git a/test/interface/ode_ndim_complex_tests.jl b/test/InterfaceI/ode_ndim_complex_tests.jl similarity index 100% rename from test/interface/ode_ndim_complex_tests.jl rename to test/InterfaceI/ode_ndim_complex_tests.jl diff --git a/test/interface/ode_numbertype_tests.jl b/test/InterfaceI/ode_numbertype_tests.jl similarity index 100% rename from test/interface/ode_numbertype_tests.jl rename to test/InterfaceI/ode_numbertype_tests.jl diff --git a/test/interface/ode_saveat_tests.jl b/test/InterfaceI/ode_saveat_tests.jl similarity index 100% rename from test/interface/ode_saveat_tests.jl rename to test/InterfaceI/ode_saveat_tests.jl diff --git a/test/interface/ode_saveidxs_tests.jl b/test/InterfaceI/ode_saveidxs_tests.jl similarity index 100% rename from test/interface/ode_saveidxs_tests.jl rename to test/InterfaceI/ode_saveidxs_tests.jl diff --git a/test/interface/ode_strip_test.jl b/test/InterfaceI/ode_strip_test.jl similarity index 100% rename from test/interface/ode_strip_test.jl rename to test/InterfaceI/ode_strip_test.jl diff --git a/test/interface/ode_tstops_tests.jl b/test/InterfaceI/ode_tstops_tests.jl similarity index 100% rename from test/interface/ode_tstops_tests.jl rename to test/InterfaceI/ode_tstops_tests.jl diff --git a/test/interface/ode_twodimlinear_tests.jl b/test/InterfaceI/ode_twodimlinear_tests.jl similarity index 100% rename from test/interface/ode_twodimlinear_tests.jl rename to test/InterfaceI/ode_twodimlinear_tests.jl diff --git a/test/interface/scalar_handling_tests.jl b/test/InterfaceI/scalar_handling_tests.jl similarity index 100% rename from test/interface/scalar_handling_tests.jl rename to test/InterfaceI/scalar_handling_tests.jl diff --git a/test/interface/solution_memory_tests.jl b/test/InterfaceI/solution_memory_tests.jl similarity index 100% rename from test/interface/solution_memory_tests.jl rename to test/InterfaceI/solution_memory_tests.jl diff --git a/test/interface/static_array_tests.jl b/test/InterfaceI/static_array_tests.jl similarity index 100% rename from test/interface/static_array_tests.jl rename to test/InterfaceI/static_array_tests.jl diff --git a/test/interface/stiffness_detection_test.jl b/test/InterfaceI/stiffness_detection_test.jl similarity index 100% rename from test/interface/stiffness_detection_test.jl rename to test/InterfaceI/stiffness_detection_test.jl diff --git a/test/interface/type_handling.jl b/test/InterfaceI/type_handling.jl similarity index 100% rename from test/interface/type_handling.jl rename to test/InterfaceI/type_handling.jl diff --git a/test/interface/autosparse_detection_tests.jl b/test/InterfaceII/autosparse_detection_tests.jl similarity index 100% rename from test/interface/autosparse_detection_tests.jl rename to test/InterfaceII/autosparse_detection_tests.jl diff --git a/test/interface/enums.jl b/test/InterfaceII/enums.jl similarity index 100% rename from test/interface/enums.jl rename to test/InterfaceII/enums.jl diff --git a/test/interface/get_du.jl b/test/InterfaceII/get_du.jl similarity index 100% rename from test/interface/get_du.jl rename to test/InterfaceII/get_du.jl diff --git a/test/interface/event_dae_addsteps.jl b/test/InterfaceIII/event_dae_addsteps.jl similarity index 100% rename from test/interface/event_dae_addsteps.jl rename to test/InterfaceIII/event_dae_addsteps.jl diff --git a/test/interface/noindex_tests.jl b/test/InterfaceIII/noindex_tests.jl similarity index 100% rename from test/interface/noindex_tests.jl rename to test/InterfaceIII/noindex_tests.jl diff --git a/test/interface/stats_tests.jl b/test/InterfaceIII/stats_tests.jl similarity index 100% rename from test/interface/stats_tests.jl rename to test/InterfaceIII/stats_tests.jl diff --git a/test/interface/units_tests.jl b/test/InterfaceIII/units_tests.jl similarity index 100% rename from test/interface/units_tests.jl rename to test/InterfaceIII/units_tests.jl diff --git a/test/interface/utility_tests.jl b/test/InterfaceIII/utility_tests.jl similarity index 100% rename from test/interface/utility_tests.jl rename to test/InterfaceIII/utility_tests.jl diff --git a/test/interface/verbosity.jl b/test/InterfaceIII/verbosity.jl similarity index 100% rename from test/interface/verbosity.jl rename to test/InterfaceIII/verbosity.jl diff --git a/test/interface/ambiguity_tests.jl b/test/InterfaceIV/ambiguity_tests.jl similarity index 100% rename from test/interface/ambiguity_tests.jl rename to test/InterfaceIV/ambiguity_tests.jl diff --git a/test/interface/precision_mixing.jl b/test/InterfaceIV/precision_mixing.jl similarity index 100% rename from test/interface/precision_mixing.jl rename to test/InterfaceIV/precision_mixing.jl diff --git a/test/interface/second_order_with_first_order_solvers.jl b/test/InterfaceIV/second_order_with_first_order_solvers.jl similarity index 100% rename from test/interface/second_order_with_first_order_solvers.jl rename to test/InterfaceIV/second_order_with_first_order_solvers.jl diff --git a/test/interface/sized_matrix_tests.jl b/test/InterfaceIV/sized_matrix_tests.jl similarity index 100% rename from test/interface/sized_matrix_tests.jl rename to test/InterfaceIV/sized_matrix_tests.jl diff --git a/test/interface/gpu_autodiff_interface_tests.jl b/test/InterfaceV/gpu_autodiff_interface_tests.jl similarity index 100% rename from test/interface/gpu_autodiff_interface_tests.jl rename to test/InterfaceV/gpu_autodiff_interface_tests.jl diff --git a/test/interface/interpolation_derivative_error_tests.jl b/test/InterfaceV/interpolation_derivative_error_tests.jl similarity index 100% rename from test/interface/interpolation_derivative_error_tests.jl rename to test/InterfaceV/interpolation_derivative_error_tests.jl diff --git a/test/odeinterface/Project.toml b/test/ODEInterfaceRegression/Project.toml similarity index 83% rename from test/odeinterface/Project.toml rename to test/ODEInterfaceRegression/Project.toml index 066cd3a956c..6c4afe2e4e5 100644 --- a/test/odeinterface/Project.toml +++ b/test/ODEInterfaceRegression/Project.toml @@ -6,6 +6,9 @@ OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" OrdinaryDiffEqExplicitRK = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" OrdinaryDiffEqHighOrderRK = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] ODEInterface = "0.5" @@ -15,6 +18,8 @@ OrdinaryDiffEqCore = "4" OrdinaryDiffEqExplicitRK = "2" OrdinaryDiffEqHighOrderRK = "2" OrdinaryDiffEqLowOrderRK = "2" +SafeTestsets = "0.1, 1" +SciMLTesting = "1" [sources] OrdinaryDiffEq = {path = "../../"} diff --git a/test/odeinterface/init_dt_vs_dopri_tests.jl b/test/ODEInterfaceRegression/init_dt_vs_dopri_tests.jl similarity index 100% rename from test/odeinterface/init_dt_vs_dopri_tests.jl rename to test/ODEInterfaceRegression/init_dt_vs_dopri_tests.jl diff --git a/test/odeinterface/odeinterface_regression.jl b/test/ODEInterfaceRegression/odeinterface_regression.jl similarity index 100% rename from test/odeinterface/odeinterface_regression.jl rename to test/ODEInterfaceRegression/odeinterface_regression.jl diff --git a/test/regression/hard_dae.jl b/test/Regression_I/hard_dae.jl similarity index 100% rename from test/regression/hard_dae.jl rename to test/Regression_I/hard_dae.jl diff --git a/test/regression/ode_adaptive_tests.jl b/test/Regression_I/ode_adaptive_tests.jl similarity index 100% rename from test/regression/ode_adaptive_tests.jl rename to test/Regression_I/ode_adaptive_tests.jl diff --git a/test/regression/ode_dense_tests.jl b/test/Regression_I/ode_dense_tests.jl similarity index 100% rename from test/regression/ode_dense_tests.jl rename to test/Regression_I/ode_dense_tests.jl diff --git a/test/regression/ode_inplace_tests.jl b/test/Regression_I/ode_inplace_tests.jl similarity index 100% rename from test/regression/ode_inplace_tests.jl rename to test/Regression_I/ode_inplace_tests.jl diff --git a/test/regression/special_interps.jl b/test/Regression_I/special_interps.jl similarity index 100% rename from test/regression/special_interps.jl rename to test/Regression_I/special_interps.jl diff --git a/test/regression/iipvsoop_tests.jl b/test/Regression_II/iipvsoop_tests.jl similarity index 100% rename from test/regression/iipvsoop_tests.jl rename to test/Regression_II/iipvsoop_tests.jl diff --git a/test/regression/inference.jl b/test/Regression_II/inference.jl similarity index 100% rename from test/regression/inference.jl rename to test/Regression_II/inference.jl diff --git a/test/regression/ode_unrolled_comparison_tests.jl b/test/Regression_II/ode_unrolled_comparison_tests.jl similarity index 100% rename from test/regression/ode_unrolled_comparison_tests.jl rename to test/Regression_II/ode_unrolled_comparison_tests.jl diff --git a/test/regression/psos_and_energy_conservation.jl b/test/Regression_II/psos_and_energy_conservation.jl similarity index 100% rename from test/regression/psos_and_energy_conservation.jl rename to test/Regression_II/psos_and_energy_conservation.jl diff --git a/test/runtests.jl b/test/runtests.jl index dc233ab866a..cb99cf9166f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,58 +1,212 @@ using Pkg using SafeTestsets, Test -const LONGER_TESTS = false +using SciMLTesting -const GROUP = get(ENV, "GROUP", "All") +const LONGER_TESTS = false const is_APPVEYOR = Sys.iswindows() && haskey(ENV, "APPVEYOR") +const GROUP = current_group() +const LIB_DIR = joinpath(dirname(@__DIR__), "lib") + +# Folder-based v1.2 layout: each functional group's test files live in its own +# `test//` folder (matching the test_groups.toml key casing). The group +# bodies below `@safetestset include` the files from those folders, reproducing the +# corresponding `if GROUP == ...` branch of the previous hand-written runtests.jl +# verbatim (same files, same order, same @safetestset isolation, same version / +# is_APPVEYOR guards). They are passed to `run_tests` as 0-arg thunks so the version +# gates survive (folder-discovery mode cannot express them) and so the `@safetestset` +# macros resolve against the `using SafeTestsets` in this module's scope. + +function interface_i() + # Skip on Julia LTS (oneunit(Type{Any}) not defined) and pre-release (stalls) + # See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/2979 + if VERSION >= v"1.11" && isempty(VERSION.prerelease) + @time @safetestset "Null u0 Callbacks Tests" include("InterfaceI/null_u0_callbacks_test.jl") + end + @time @safetestset "Tstops Tests" include("InterfaceI/ode_tstops_tests.jl") + @time @safetestset "Backwards Tests" include("InterfaceI/ode_backwards_test.jl") + @time @safetestset "Initdt Tests" include("InterfaceI/ode_initdt_tests.jl") + @time @safetestset "Linear Tests" include("InterfaceI/ode_twodimlinear_tests.jl") + @time @safetestset "Inf Tests" include("InterfaceI/inf_handling.jl") + @time @safetestset "saveat Tests" include("InterfaceI/ode_saveat_tests.jl") + @time @safetestset "save_idxs Tests" include("InterfaceI/ode_saveidxs_tests.jl") + @time @safetestset "Scalar Handling Tests" include("InterfaceI/scalar_handling_tests.jl") + @time @safetestset "Static Array Tests" include("InterfaceI/static_array_tests.jl") + @time @safetestset "derivative_discontinuity Tests" include("InterfaceI/derivative_discontinuity_test.jl") + @time @safetestset "Composite Algorithm Tests" include("InterfaceI/composite_algorithm_test.jl") + @time @safetestset "Complex Tests" include("InterfaceI/complex_tests.jl") + @time @safetestset "Ndim Complex Tests" include("InterfaceI/ode_ndim_complex_tests.jl") + @time @safetestset "Number Type Tests" include("InterfaceI/ode_numbertype_tests.jl") + @time @safetestset "Interpolation Output Type Tests" include("InterfaceI/interpolation_output_types.jl") + @time @safetestset "Stiffness Detection Tests" include("InterfaceI/stiffness_detection_test.jl") + @time @safetestset "Composite Interpolation Tests" include("InterfaceI/composite_interpolation.jl") + @time @safetestset "Export tests" include("InterfaceI/export_tests.jl") + @time @safetestset "Type Handling Tests" include("InterfaceI/type_handling.jl") + @time @safetestset "Controller Tests" include("InterfaceI/controllers.jl") + @time @safetestset "Inplace Interpolation Tests" include("InterfaceI/inplace_interpolation.jl") + @time @safetestset "Algebraic Interpolation Tests" include("InterfaceI/algebraic_interpolation.jl") + @time @safetestset "Interpolation and Cache Stripping Tests" include("InterfaceI/ode_strip_test.jl") + @time @safetestset "Aliasing Tests" include("InterfaceI/aliasing_tests.jl") + return @time @safetestset "Solution Memory Release" include("InterfaceI/solution_memory_tests.jl") +end + +function interface_ii() + is_APPVEYOR && return + #@time @safetestset "No Recompile Tests" include("shared/norecompile.jl") # doesn't work on CI? + @time @safetestset "AutoSparse Detection Tests" include("InterfaceII/autosparse_detection_tests.jl") + @time @safetestset "Enum Tests" include("InterfaceII/enums.jl") + return @time @safetestset "Get du Tests" include("InterfaceII/get_du.jl") +end + +function interface_iii() + is_APPVEYOR && return + @time @safetestset "Derivative Utilities Tests" include("InterfaceIII/utility_tests.jl") + @time @safetestset "stats Tests" include("InterfaceIII/stats_tests.jl") + @time @safetestset "No Index Tests" include("InterfaceIII/noindex_tests.jl") + @time @safetestset "Events + DAE addsteps Tests" include("InterfaceIII/event_dae_addsteps.jl") + @time @safetestset "Units Tests" include("InterfaceIII/units_tests.jl") + return @time @safetestset "DEVerbosity Tests" include("InterfaceIII/verbosity.jl") +end + +function interface_iv() + is_APPVEYOR && return + @time @safetestset "Ambiguity Tests" include("InterfaceIV/ambiguity_tests.jl") + @time @safetestset "Precision Mixing Tests" include("InterfaceIV/precision_mixing.jl") + @time @safetestset "Sized Matrix Tests" include("InterfaceIV/sized_matrix_tests.jl") + return @time @safetestset "Second Order with First Order Solver Tests" include("InterfaceIV/second_order_with_first_order_solvers.jl") +end + +function interface_v() + is_APPVEYOR && return + @time @safetestset "Interpolation Derivative Error Tests" include("InterfaceV/interpolation_derivative_error_tests.jl") + return @time @safetestset "GPU AutoDiff Interface Tests" include("InterfaceV/gpu_autodiff_interface_tests.jl") +end + +function integrators_i() + is_APPVEYOR && return + @time @safetestset "Reinit Tests" include("Integrators_I/reinit_test.jl") + @time @safetestset "Events Tests" include("Integrators_I/ode_event_tests.jl") + @time @safetestset "Alg Events Tests" include("Integrators_I/alg_events_tests.jl") + @time @safetestset "Discrete Callback Dual Tests" include("Integrators_I/discrete_callback_dual_test.jl") + @time @safetestset "Callback Allocation Tests" include("Integrators_I/callback_allocation_tests.jl") + @time @safetestset "Iterator Tests" include("Integrators_I/iterator_tests.jl") + @time @safetestset "Integrator Interface Tests" include("Integrators_I/integrator_interface_tests.jl") + @time @safetestset "Error Check Tests" include("Integrators_I/check_error.jl") + @time @safetestset "Event Detection Tests" include("Integrators_I/event_detection_tests.jl") + @time @safetestset "Event Repetition Detection Tests" include("Integrators_I/event_repeat_tests.jl") + @time @safetestset "Multi-VCC Mask Tests" include("Integrators_I/multi_vcc_mask_tests.jl") + return @time @safetestset "Step Limiter Tests" include("Integrators_I/step_limiter_test.jl") +end + +function integrators_ii() + is_APPVEYOR && return + @time @safetestset "Integrator RNG Tests" include("Integrators_II/integrator_rng_tests.jl") + @time @safetestset "Reverse Directioned Event Tests" include("Integrators_II/rev_events_tests.jl") + @time @safetestset "Differentiation Direction Tests" include("Integrators_II/diffdir_tests.jl") + @time @safetestset "Resize Tests" include("Integrators_II/resize_tests.jl") + @time @safetestset "Cache Tests" include("Integrators_II/ode_cache_tests.jl") + @time @safetestset "Add Steps Tests" include("Integrators_II/ode_add_steps_tests.jl") + return @time @safetestset "IMEX Split Function Tests" include("Integrators_II/split_ode_tests.jl") +end + +function regression_i() + is_APPVEYOR && return + @time @safetestset "Dense Tests" include("Regression_I/ode_dense_tests.jl") + @time @safetestset "Special Interp Tests" include("Regression_I/special_interps.jl") + @time @safetestset "Inplace Tests" include("Regression_I/ode_inplace_tests.jl") + @time @safetestset "Adaptive Tests" include("Regression_I/ode_adaptive_tests.jl") + return @time @safetestset "Hard DAE Tests" include("Regression_I/hard_dae.jl") +end + +function regression_ii() + is_APPVEYOR && return + @time @safetestset "PSOS Energy Conservation Tests" include("Regression_II/psos_and_energy_conservation.jl") + @time @safetestset "Unrolled Tests" include("Regression_II/ode_unrolled_comparison_tests.jl") + @time @safetestset "IIP vs OOP Tests" include("Regression_II/iipvsoop_tests.jl") + return @time @safetestset "Inference Tests" include("Regression_II/inference.jl") +end + +function algconvergence_i() + is_APPVEYOR && return + return @time @safetestset "Non-autonomous Convergence Tests" include("AlgConvergence_I/non-autonomous_convergence_tests.jl") +end + +function algconvergence_iii() + is_APPVEYOR && return + return @time @safetestset "Split Methods Tests" include("AlgConvergence_III/split_methods_tests.jl") +end + +# AD / Downstream / ODEInterfaceRegression activate their own per-group +# Project.toml exactly as the previous `activate_*_env` helpers did: +# `Pkg.activate(dir)`, `Pkg.develop(path = repo root)`, `Pkg.instantiate()`. +# They are kept as thunks (not `env =` group specs) so the develop/instantiate +# behavior — in particular NOT transitively developing the sub-env's `[sources]` +# on Julia < 1.11 — stays byte-for-byte identical to before the refactor. function activate_downstream_env() - Pkg.activate("downstream") + Pkg.activate("Downstream") Pkg.develop(PackageSpec(path = dirname(@__DIR__))) return Pkg.instantiate() end function activate_odeinterface_env() - Pkg.activate("odeinterface") + Pkg.activate("ODEInterfaceRegression") Pkg.develop(PackageSpec(path = dirname(@__DIR__))) return Pkg.instantiate() end function activate_ad_env() - Pkg.activate("ad") + Pkg.activate("AD") Pkg.develop(PackageSpec(path = dirname(@__DIR__))) return Pkg.instantiate() end -function activate_modelingtoolkit_env() - Pkg.activate("modelingtoolkit") - Pkg.develop(PackageSpec(path = dirname(@__DIR__))) - return Pkg.instantiate() +function downstream_group() + is_APPVEYOR && return + activate_downstream_env() + @time @safetestset "Measurements Tests" include("Downstream/measurements.jl") + @time @safetestset "Time derivative Tests" include("Downstream/time_derivative_test.jl") + return @time @safetestset "DynamicQuantities + Measurements Tests" include("Downstream/dynamicquantities_measurements.jl") +end + +function ad_group() + # AD tests - Enzyme/Zygote only on Julia <= 1.11 (see https://github.com/EnzymeAD/Enzyme.jl/issues/2699) + # Mooncake works on all Julia versions + is_APPVEYOR && return + activate_ad_env() + @time @safetestset "AD Tests" include("AD/ad_tests.jl") + @time @safetestset "Autodiff Events Tests" include("AD/autodiff_events.jl") + return @time @safetestset "Discrete Adjoint Tests" include("AD/discrete_adjoints.jl") end -#Start Test Script +function odeinterface_group() + # Don't run ODEInterface tests on prerelease + (is_APPVEYOR || !isempty(VERSION.prerelease)) && return + activate_odeinterface_env() + @time @safetestset "Init dt vs dorpri tests" include("ODEInterfaceRegression/init_dt_vs_dopri_tests.jl") + return @time @safetestset "ODEInterface Regression Tests" include("ODEInterfaceRegression/odeinterface_regression.jl") +end + +function qa_group() + is_APPVEYOR && return + return @time @safetestset "Quality Assurance Tests" include("qa/qa_tests.jl") +end @time begin - # Detect sublibrary test groups. - # GROUP can be a bare sublibrary name (Core test group) or - # "{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) + # Monorepo sublibrary routing. The root reads GROUP to pick a `lib/` + # sublibrary, transitively develops its `[sources]` on Julia < 1.11, then + # `Pkg.test`s it with the sub-group handed off via ODEDIFFEQ_TEST_GROUP. + # This is kept as an explicit pre-step (rather than delegated to + # `run_tests`'s built-in `lib_dir` path) so the sublibrary `Pkg.test` + # invocation — `julia_args`, `force_latest_compatible_version = false`, + # `allow_reresolve = true` — stays byte-for-byte identical to the previous + # runtests.jl. (`run_tests`'s sublibrary path only passes `allow_reresolve`, + # which would silently drop `--depwarn=yes`/`force_latest_compatible_version`.) + # The root group dispatch (All / Interface / Integrators / Regression / QA / + # functional groups) is delegated to `run_tests` below. + base_group, test_group = detect_sublibrary_group(GROUP, LIB_DIR) - if isdir(joinpath(lib_dir, base_group)) - Pkg.activate(joinpath(lib_dir, base_group)) + if !isempty(base_group) && isdir(joinpath(LIB_DIR, base_group)) + Pkg.activate(joinpath(LIB_DIR, base_group)) # On Julia < 1.11, the [sources] section in Project.toml is not supported. # Manually Pkg.develop local path dependencies so CI tests the PR branch code. # We resolve transitively: each developed dependency's own [sources] are also @@ -67,9 +221,9 @@ end # otherwise try to `Pkg.develop` the active project itself, which # Pkg refuses with "package has the same name or UUID as the # active project". - push!(developed, normpath(joinpath(lib_dir, base_group))) + push!(developed, normpath(joinpath(LIB_DIR, base_group))) specs = Pkg.PackageSpec[] - queue = [joinpath(lib_dir, base_group)] + queue = [joinpath(LIB_DIR, base_group)] while !isempty(queue) pkg_dir = popfirst!(queue) toml_path = joinpath(pkg_dir, "Project.toml") @@ -98,144 +252,61 @@ end withenv("ODEDIFFEQ_TEST_GROUP" => test_group) do 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 == "InterfaceI" || GROUP == "Interface" - # Skip on Julia LTS (oneunit(Type{Any}) not defined) and pre-release (stalls) - # See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/2979 - if VERSION >= v"1.11" && isempty(VERSION.prerelease) - @time @safetestset "Null u0 Callbacks Tests" include("interface/null_u0_callbacks_test.jl") - end - @time @safetestset "Tstops Tests" include("interface/ode_tstops_tests.jl") - @time @safetestset "Backwards Tests" include("interface/ode_backwards_test.jl") - @time @safetestset "Initdt Tests" include("interface/ode_initdt_tests.jl") - @time @safetestset "Linear Tests" include("interface/ode_twodimlinear_tests.jl") - @time @safetestset "Inf Tests" include("interface/inf_handling.jl") - @time @safetestset "saveat Tests" include("interface/ode_saveat_tests.jl") - @time @safetestset "save_idxs Tests" include("interface/ode_saveidxs_tests.jl") - @time @safetestset "Scalar Handling Tests" include("interface/scalar_handling_tests.jl") - @time @safetestset "Static Array Tests" include("interface/static_array_tests.jl") - @time @safetestset "derivative_discontinuity Tests" include("interface/derivative_discontinuity_test.jl") - @time @safetestset "Composite Algorithm Tests" include("interface/composite_algorithm_test.jl") - @time @safetestset "Complex Tests" include("interface/complex_tests.jl") - @time @safetestset "Ndim Complex Tests" include("interface/ode_ndim_complex_tests.jl") - @time @safetestset "Number Type Tests" include("interface/ode_numbertype_tests.jl") - @time @safetestset "Interpolation Output Type Tests" include("interface/interpolation_output_types.jl") - @time @safetestset "Stiffness Detection Tests" include("interface/stiffness_detection_test.jl") - @time @safetestset "Composite Interpolation Tests" include("interface/composite_interpolation.jl") - @time @safetestset "Export tests" include("interface/export_tests.jl") - @time @safetestset "Type Handling Tests" include("interface/type_handling.jl") - @time @safetestset "Controller Tests" include("interface/controllers.jl") - @time @safetestset "Inplace Interpolation Tests" include("interface/inplace_interpolation.jl") - @time @safetestset "Algebraic Interpolation Tests" include("interface/algebraic_interpolation.jl") - @time @safetestset "Interpolation and Cache Stripping Tests" include("interface/ode_strip_test.jl") - @time @safetestset "Aliasing Tests" include("interface/aliasing_tests.jl") - @time @safetestset "Solution Memory Release" include("interface/solution_memory_tests.jl") - end - - if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceII" || GROUP == "Interface") - #@time @safetestset "No Recompile Tests" include("interface/norecompile.jl") # doesn't work on CI? - @time @safetestset "AutoSparse Detection Tests" include("interface/autosparse_detection_tests.jl") - @time @safetestset "Enum Tests" include("interface/enums.jl") - @time @safetestset "Get du Tests" include("interface/get_du.jl") - end - - if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceIII" || GROUP == "Interface") - @time @safetestset "Derivative Utilities Tests" include("interface/utility_tests.jl") - @time @safetestset "stats Tests" include("interface/stats_tests.jl") - @time @safetestset "No Index Tests" include("interface/noindex_tests.jl") - @time @safetestset "Events + DAE addsteps Tests" include("interface/event_dae_addsteps.jl") - @time @safetestset "Units Tests" include("interface/units_tests.jl") - @time @safetestset "DEVerbosity Tests" include("interface/verbosity.jl") - end - - if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceIV" || GROUP == "Interface") - @time @safetestset "Ambiguity Tests" include("interface/ambiguity_tests.jl") - @time @safetestset "Precision Mixing Tests" include("interface/precision_mixing.jl") - @time @safetestset "Sized Matrix Tests" include("interface/sized_matrix_tests.jl") - @time @safetestset "Second Order with First Order Solver Tests" include("interface/second_order_with_first_order_solvers.jl") - end - - if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceV" || GROUP == "Interface") - @time @safetestset "Interpolation Derivative Error Tests" include("interface/interpolation_derivative_error_tests.jl") - @time @safetestset "GPU AutoDiff Interface Tests" include("interface/gpu_autodiff_interface_tests.jl") - end - - if !is_APPVEYOR && - (GROUP == "All" || GROUP == "Integrators_I" || GROUP == "Integrators") - @time @safetestset "Reinit Tests" include("integrators/reinit_test.jl") - @time @safetestset "Events Tests" include("integrators/ode_event_tests.jl") - @time @safetestset "Alg Events Tests" include("integrators/alg_events_tests.jl") - @time @safetestset "Discrete Callback Dual Tests" include("integrators/discrete_callback_dual_test.jl") - @time @safetestset "Callback Allocation Tests" include("integrators/callback_allocation_tests.jl") - @time @safetestset "Iterator Tests" include("integrators/iterator_tests.jl") - @time @safetestset "Integrator Interface Tests" include("integrators/integrator_interface_tests.jl") - @time @safetestset "Error Check Tests" include("integrators/check_error.jl") - @time @safetestset "Event Detection Tests" include("integrators/event_detection_tests.jl") - @time @safetestset "Event Repetition Detection Tests" include("integrators/event_repeat_tests.jl") - @time @safetestset "Multi-VCC Mask Tests" include("integrators/multi_vcc_mask_tests.jl") - @time @safetestset "Step Limiter Tests" include("integrators/step_limiter_test.jl") - end - - if !is_APPVEYOR && - (GROUP == "All" || GROUP == "Integrators_II" || GROUP == "Integrators") - @time @safetestset "Integrator RNG Tests" include("integrators/integrator_rng_tests.jl") - @time @safetestset "Reverse Directioned Event Tests" include("integrators/rev_events_tests.jl") - @time @safetestset "Differentiation Direction Tests" include("integrators/diffdir_tests.jl") - @time @safetestset "Resize Tests" include("integrators/resize_tests.jl") - @time @safetestset "Cache Tests" include("integrators/ode_cache_tests.jl") - @time @safetestset "Add Steps Tests" include("integrators/ode_add_steps_tests.jl") - @time @safetestset "IMEX Split Function Tests" include("integrators/split_ode_tests.jl") - end - - if !is_APPVEYOR && (GROUP == "All" || GROUP == "Regression_I" || GROUP == "Regression") - @time @safetestset "Dense Tests" include("regression/ode_dense_tests.jl") - @time @safetestset "Special Interp Tests" include("regression/special_interps.jl") - @time @safetestset "Inplace Tests" include("regression/ode_inplace_tests.jl") - @time @safetestset "Adaptive Tests" include("regression/ode_adaptive_tests.jl") - @time @safetestset "Hard DAE Tests" include("regression/hard_dae.jl") - end - - if !is_APPVEYOR && (GROUP == "All" || GROUP == "Regression_II" || GROUP == "Regression") - @time @safetestset "PSOS Energy Conservation Tests" include("regression/psos_and_energy_conservation.jl") - @time @safetestset "Unrolled Tests" include("regression/ode_unrolled_comparison_tests.jl") - @time @safetestset "IIP vs OOP Tests" include("regression/iipvsoop_tests.jl") - @time @safetestset "Inference Tests" include("regression/inference.jl") - end - - if !is_APPVEYOR && GROUP == "AlgConvergence_I" - @time @safetestset "Non-autonomous Convergence Tests" include("algconvergence/non-autonomous_convergence_tests.jl") - end - - if !is_APPVEYOR && GROUP == "AlgConvergence_III" - @time @safetestset "Split Methods Tests" include("algconvergence/split_methods_tests.jl") - end - - # ModelingToolkit tests moved to OrdinaryDiffEqDifferentiation and - # OrdinaryDiffEqNonlinearSolve subpackage test groups (ModelingToolkit group). - - if !is_APPVEYOR && GROUP == "Downstream" - activate_downstream_env() - @time @safetestset "Measurements Tests" include("downstream/measurements.jl") - @time @safetestset "Time derivative Tests" include("downstream/time_derivative_test.jl") - @time @safetestset "DynamicQuantities + Measurements Tests" include("downstream/dynamicquantities_measurements.jl") - end - - # AD tests - Enzyme/Zygote only on Julia <= 1.11 (see https://github.com/EnzymeAD/Enzyme.jl/issues/2699) - # Mooncake works on all Julia versions - if !is_APPVEYOR && GROUP == "AD" - activate_ad_env() - @time @safetestset "AD Tests" include("ad/ad_tests.jl") - @time @safetestset "Autodiff Events Tests" include("ad/autodiff_events.jl") - @time @safetestset "Discrete Adjoint Tests" include("ad/discrete_adjoints.jl") - end - - # Don't run ODEInterface tests on prerelease - if !is_APPVEYOR && GROUP == "ODEInterfaceRegression" && isempty(VERSION.prerelease) - activate_odeinterface_env() - @time @safetestset "Init dt vs dorpri tests" include("odeinterface/init_dt_vs_dopri_tests.jl") - @time @safetestset "ODEInterface Regression Tests" include("odeinterface/odeinterface_regression.jl") - end - - if !is_APPVEYOR && GROUP == "QA" - @time @safetestset "Quality Assurance Tests" include("qa/qa_tests.jl") + else + # Root-package group dispatch. `run_tests` owns the All / Interface / + # Integrators / Regression / QA / functional-group routing that the old + # hand-written `if GROUP == ...` ladder expressed. The group bodies + # `@safetestset include` files from the per-group `test//` + # folders (the v1.2 folder layout). + run_tests(; + # No root "Core" body: the previous runtests.jl had no Core branch. + # A no-op core keeps GROUP=Core a no-op (matching the old behavior) + # and is excluded from `all`. + core = () -> nothing, + groups = Dict( + "InterfaceI" => interface_i, + "InterfaceII" => interface_ii, + "InterfaceIII" => interface_iii, + "InterfaceIV" => interface_iv, + "InterfaceV" => interface_v, + "Integrators_I" => integrators_i, + "Integrators_II" => integrators_ii, + "Regression_I" => regression_i, + "Regression_II" => regression_ii, + "AlgConvergence_I" => algconvergence_i, + "AlgConvergence_III" => algconvergence_iii, + "Downstream" => downstream_group, + "AD" => ad_group, + "ODEInterfaceRegression" => odeinterface_group, + ), + # QA runs in the root test environment (no per-group Project.toml); + # its body is the ExplicitImports testset, not the standard + # Aqua/JET `run_qa`. + qa = qa_group, + # `All` runs exactly the Interface/Integrators/Regression functional + # groups (in this order), matching the previous `GROUP == "All"` + # branches. It deliberately EXCLUDES QA, AlgConvergence_*, + # Downstream, AD, and ODEInterfaceRegression — none of which the old + # `All` branch ran. + all = [ + "InterfaceI", "InterfaceII", "InterfaceIII", "InterfaceIV", "InterfaceV", + "Integrators_I", "Integrators_II", + "Regression_I", "Regression_II", + ], + # Umbrella groups: one GROUP value triggers several functional + # groups, reproducing the old `GROUP == "Interface"` / + # `"Integrators"` / `"Regression"` branches. + umbrellas = Dict( + "Interface" => ["InterfaceI", "InterfaceII", "InterfaceIII", "InterfaceIV", "InterfaceV"], + "Integrators" => ["Integrators_I", "Integrators_II"], + "Regression" => ["Regression_I", "Regression_II"], + ), + # Monorepo sublibrary handoff var: the root reads GROUP, but each + # sublibrary reads ODEDIFFEQ_TEST_GROUP for its sub-group. The + # sublibrary Pkg.test is done explicitly above; sublib_env/lib_dir + # are passed for completeness so the routing config is self-describing. + sublib_env = "ODEDIFFEQ_TEST_GROUP", + lib_dir = LIB_DIR, + ) end end # @time diff --git a/test/interface/float32.jl b/test/shared/float32.jl similarity index 100% rename from test/interface/float32.jl rename to test/shared/float32.jl diff --git a/test/interface/linear_solver_split_ode_test.jl b/test/shared/linear_solver_split_ode_test.jl similarity index 100% rename from test/interface/linear_solver_split_ode_test.jl rename to test/shared/linear_solver_split_ode_test.jl diff --git a/test/interface/linear_solver_test.jl b/test/shared/linear_solver_test.jl similarity index 100% rename from test/interface/linear_solver_test.jl rename to test/shared/linear_solver_test.jl diff --git a/test/interface/nojac.jl b/test/shared/nojac.jl similarity index 100% rename from test/interface/nojac.jl rename to test/shared/nojac.jl diff --git a/test/interface/nonfulldiagonal_sparse.jl b/test/shared/nonfulldiagonal_sparse.jl similarity index 100% rename from test/interface/nonfulldiagonal_sparse.jl rename to test/shared/nonfulldiagonal_sparse.jl diff --git a/test/interface/norecompile.jl b/test/shared/norecompile.jl similarity index 100% rename from test/interface/norecompile.jl rename to test/shared/norecompile.jl diff --git a/test/interface/reinit_retcode_tests.jl b/test/shared/reinit_retcode_tests.jl similarity index 100% rename from test/interface/reinit_retcode_tests.jl rename to test/shared/reinit_retcode_tests.jl diff --git a/test/downstream/sparsediff_tests.jl b/test/shared/sparsediff_tests.jl similarity index 100% rename from test/downstream/sparsediff_tests.jl rename to test/shared/sparsediff_tests.jl