diff --git a/test/allocations.jl b/test/InterfaceI/allocations.jl similarity index 100% rename from test/allocations.jl rename to test/InterfaceI/allocations.jl diff --git a/test/bimolerx_test.jl b/test/InterfaceI/bimolerx_test.jl similarity index 100% rename from test/bimolerx_test.jl rename to test/InterfaceI/bimolerx_test.jl diff --git a/test/bracketing.jl b/test/InterfaceI/bracketing.jl similarity index 100% rename from test/bracketing.jl rename to test/InterfaceI/bracketing.jl diff --git a/test/callbacks.jl b/test/InterfaceI/callbacks.jl similarity index 100% rename from test/callbacks.jl rename to test/InterfaceI/callbacks.jl diff --git a/test/constant_rate.jl b/test/InterfaceI/constant_rate.jl similarity index 100% rename from test/constant_rate.jl rename to test/InterfaceI/constant_rate.jl diff --git a/test/degenerate_rx_cases.jl b/test/InterfaceI/degenerate_rx_cases.jl similarity index 100% rename from test/degenerate_rx_cases.jl rename to test/InterfaceI/degenerate_rx_cases.jl diff --git a/test/extended_jump_array.jl b/test/InterfaceI/extended_jump_array.jl similarity index 100% rename from test/extended_jump_array.jl rename to test/InterfaceI/extended_jump_array.jl diff --git a/test/extinction_test.jl b/test/InterfaceI/extinction_test.jl similarity index 100% rename from test/extinction_test.jl rename to test/InterfaceI/extinction_test.jl diff --git a/test/fp_unknowns.jl b/test/InterfaceI/fp_unknowns.jl similarity index 100% rename from test/fp_unknowns.jl rename to test/InterfaceI/fp_unknowns.jl diff --git a/test/functionwrappers.jl b/test/InterfaceI/functionwrappers.jl similarity index 100% rename from test/functionwrappers.jl rename to test/InterfaceI/functionwrappers.jl diff --git a/test/geneexpr_test.jl b/test/InterfaceI/geneexpr_test.jl similarity index 100% rename from test/geneexpr_test.jl rename to test/InterfaceI/geneexpr_test.jl diff --git a/test/linearreaction_test.jl b/test/InterfaceI/linearreaction_test.jl similarity index 100% rename from test/linearreaction_test.jl rename to test/InterfaceI/linearreaction_test.jl diff --git a/test/monte_carlo_test.jl b/test/InterfaceI/monte_carlo_test.jl similarity index 100% rename from test/monte_carlo_test.jl rename to test/InterfaceI/monte_carlo_test.jl diff --git a/test/regular_jumps.jl b/test/InterfaceI/regular_jumps.jl similarity index 100% rename from test/regular_jumps.jl rename to test/InterfaceI/regular_jumps.jl diff --git a/test/scale_rates_field_test.jl b/test/InterfaceI/scale_rates_field_test.jl similarity index 100% rename from test/scale_rates_field_test.jl rename to test/InterfaceI/scale_rates_field_test.jl diff --git a/test/sir_model.jl b/test/InterfaceI/sir_model.jl similarity index 100% rename from test/sir_model.jl rename to test/InterfaceI/sir_model.jl diff --git a/test/splitcoupled.jl b/test/InterfaceI/splitcoupled.jl similarity index 100% rename from test/splitcoupled.jl rename to test/InterfaceI/splitcoupled.jl diff --git a/test/ssa_callback_test.jl b/test/InterfaceI/ssa_callback_test.jl similarity index 100% rename from test/ssa_callback_test.jl rename to test/InterfaceI/ssa_callback_test.jl diff --git a/test/ssa_tests.jl b/test/InterfaceI/ssa_tests.jl similarity index 100% rename from test/ssa_tests.jl rename to test/InterfaceI/ssa_tests.jl diff --git a/test/table_test.jl b/test/InterfaceI/table_test.jl similarity index 100% rename from test/table_test.jl rename to test/InterfaceI/table_test.jl diff --git a/test/variable_rate.jl b/test/InterfaceI/variable_rate.jl similarity index 100% rename from test/variable_rate.jl rename to test/InterfaceI/variable_rate.jl diff --git a/test/spatial/ABC.jl b/test/InterfaceII/ABC.jl similarity index 100% rename from test/spatial/ABC.jl rename to test/InterfaceII/ABC.jl diff --git a/test/spatial/bracketing.jl b/test/InterfaceII/bracketing.jl similarity index 100% rename from test/spatial/bracketing.jl rename to test/InterfaceII/bracketing.jl diff --git a/test/spatial/diffusion.jl b/test/InterfaceII/diffusion.jl similarity index 100% rename from test/spatial/diffusion.jl rename to test/InterfaceII/diffusion.jl diff --git a/test/ensemble_problems.jl b/test/InterfaceII/ensemble_problems.jl similarity index 100% rename from test/ensemble_problems.jl rename to test/InterfaceII/ensemble_problems.jl diff --git a/test/ensemble_uniqueness.jl b/test/InterfaceII/ensemble_uniqueness.jl similarity index 100% rename from test/ensemble_uniqueness.jl rename to test/InterfaceII/ensemble_uniqueness.jl diff --git a/test/extended_jump_array_remake.jl b/test/InterfaceII/extended_jump_array_remake.jl similarity index 100% rename from test/extended_jump_array_remake.jl rename to test/InterfaceII/extended_jump_array_remake.jl diff --git a/test/hawkes_test.jl b/test/InterfaceII/hawkes_test.jl similarity index 100% rename from test/hawkes_test.jl rename to test/InterfaceII/hawkes_test.jl diff --git a/test/spatial/hop_rates.jl b/test/InterfaceII/hop_rates.jl similarity index 100% rename from test/spatial/hop_rates.jl rename to test/InterfaceII/hop_rates.jl diff --git a/test/jprob_symbol_indexing.jl b/test/InterfaceII/jprob_symbol_indexing.jl similarity index 100% rename from test/jprob_symbol_indexing.jl rename to test/InterfaceII/jprob_symbol_indexing.jl diff --git a/test/longtimes_test.jl b/test/InterfaceII/longtimes_test.jl similarity index 100% rename from test/longtimes_test.jl rename to test/InterfaceII/longtimes_test.jl diff --git a/test/spatial/reaction_rates.jl b/test/InterfaceII/reaction_rates.jl similarity index 100% rename from test/spatial/reaction_rates.jl rename to test/InterfaceII/reaction_rates.jl diff --git a/test/remake_test.jl b/test/InterfaceII/remake_test.jl similarity index 100% rename from test/remake_test.jl rename to test/InterfaceII/remake_test.jl diff --git a/test/reversible_binding.jl b/test/InterfaceII/reversible_binding.jl similarity index 100% rename from test/reversible_binding.jl rename to test/InterfaceII/reversible_binding.jl diff --git a/test/save_positions.jl b/test/InterfaceII/save_positions.jl similarity index 100% rename from test/save_positions.jl rename to test/InterfaceII/save_positions.jl diff --git a/test/saveat_regression.jl b/test/InterfaceII/saveat_regression.jl similarity index 100% rename from test/saveat_regression.jl rename to test/InterfaceII/saveat_regression.jl diff --git a/test/spatial/spatial_majump.jl b/test/InterfaceII/spatial_majump.jl similarity index 100% rename from test/spatial/spatial_majump.jl rename to test/InterfaceII/spatial_majump.jl diff --git a/test/thread_safety.jl b/test/InterfaceII/thread_safety.jl similarity index 100% rename from test/thread_safety.jl rename to test/InterfaceII/thread_safety.jl diff --git a/test/spatial/topology.jl b/test/InterfaceII/topology.jl similarity index 100% rename from test/spatial/topology.jl rename to test/InterfaceII/topology.jl diff --git a/test/qa.jl b/test/qa/qa.jl similarity index 100% rename from test/qa.jl rename to test/qa/qa.jl diff --git a/test/runtests.jl b/test/runtests.jl index 9a2dfc246..746382dda 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,6 @@ #! format: off using JumpProcesses, SafeTestsets, Pkg - -const GROUP = get(ENV, "GROUP", "All") +using SciMLTesting function activate_gpu_env() Pkg.activate("gpu") @@ -9,61 +8,66 @@ function activate_gpu_env() Pkg.instantiate() end -@time begin - if GROUP == "QA" - @time @safetestset "QA Tests" begin include("qa.jl") end - end - - if GROUP == "All" || GROUP == "InterfaceI" - @time @safetestset "Constant Rate Tests" begin include("constant_rate.jl") end - @time @safetestset "Variable Rate Tests" begin include("variable_rate.jl") end - @time @safetestset "ExtendedJumpArray Tests" begin include("extended_jump_array.jl") end - @time @safetestset "FunctionWrapper Tests" begin include("functionwrappers.jl") end - @time @safetestset "Monte Carlo Tests" begin include("monte_carlo_test.jl") end - @time @safetestset "Split Coupled Tests" begin include("splitcoupled.jl") end - @time @safetestset "SSA Tests" begin include("ssa_tests.jl") end - @time @safetestset "Tau Leaping Tests" begin include("regular_jumps.jl") end - @time @safetestset "Simple SSA Callback Test" begin include("ssa_callback_test.jl") end - @time @safetestset "SIR Discrete Callback Test" begin include("sir_model.jl") end - @time @safetestset "Callback Merging Tests" begin include("callbacks.jl") end - @time @safetestset "Linear Reaction SSA Test" begin include("linearreaction_test.jl") end - @time @safetestset "Mass Action Jump Tests; Gene Expr Model" begin include("geneexpr_test.jl") end - @time @safetestset "Mass Action Jump Tests; Nonlinear Rx Model" begin include("bimolerx_test.jl") end - @time @safetestset "Mass Action Jump Tests; Special Cases" begin include("degenerate_rx_cases.jl") end - @time @safetestset "Mass Action Jump Tests; Floating Point Inputs" begin include("fp_unknowns.jl") end - @time @safetestset "scale_rates Field Tests" begin include("scale_rates_field_test.jl") end - @time @safetestset "Direct allocations test" begin include("allocations.jl") end - @time @safetestset "Bracketing Tests" begin include("bracketing.jl") end - @time @safetestset "Composition-Rejection Table Tests" begin include("table_test.jl") end - @time @safetestset "Extinction test" begin include("extinction_test.jl") end - end - if GROUP == "All" || GROUP == "InterfaceII" - @time @safetestset "Saveat Regression test" begin include("saveat_regression.jl") end - @time @safetestset "Save_positions test" begin include("save_positions.jl") end - @time @safetestset "Ensemble Uniqueness test" begin include("ensemble_uniqueness.jl") end - @time @safetestset "Thread Safety test" begin include("thread_safety.jl") end - @time @safetestset "Ensemble Problem Tests" begin include("ensemble_problems.jl") end - @time @safetestset "A + B <--> C" begin include("reversible_binding.jl") end - @time @safetestset "Remake tests" begin include("remake_test.jl") end - @time @safetestset "ExtendedJumpArray remake tests" begin include("extended_jump_array_remake.jl") end - @time @safetestset "Symbol based problem indexing" begin include("jprob_symbol_indexing.jl") end - @time @safetestset "Long time accuracy test" begin include("longtimes_test.jl") end - @time @safetestset "Hawkes process" begin include("hawkes_test.jl") end - @time @safetestset "Reaction rates" begin include("spatial/reaction_rates.jl") end - @time @safetestset "Hop rates" begin include("spatial/hop_rates.jl") end - @time @safetestset "Topology" begin include("spatial/topology.jl") end - @time @safetestset "Spatial bracketing Tests" begin include("spatial/bracketing.jl") end - @time @safetestset "Spatial A + B <--> C" begin include("spatial/ABC.jl") end - @time @safetestset "Spatially Varying Reaction Rates" begin include("spatial/spatial_majump.jl") end - @time @safetestset "Pure diffusion" begin include("spatial/diffusion.jl") end - end - - if GROUP == "CUDA" - activate_gpu_env() - @time @safetestset "GPU Tau Leaping test" begin include("gpu/regular_jumps.jl") end - end - - if GROUP == "Correctness" - activate_gpu_env() - end -end +run_tests(; + core = function () + return nothing + end, + groups = Dict( + "InterfaceI" => function () + @time @safetestset "Constant Rate Tests" begin include("InterfaceI/constant_rate.jl") end + @time @safetestset "Variable Rate Tests" begin include("InterfaceI/variable_rate.jl") end + @time @safetestset "ExtendedJumpArray Tests" begin include("InterfaceI/extended_jump_array.jl") end + @time @safetestset "FunctionWrapper Tests" begin include("InterfaceI/functionwrappers.jl") end + @time @safetestset "Monte Carlo Tests" begin include("InterfaceI/monte_carlo_test.jl") end + @time @safetestset "Split Coupled Tests" begin include("InterfaceI/splitcoupled.jl") end + @time @safetestset "SSA Tests" begin include("InterfaceI/ssa_tests.jl") end + @time @safetestset "Tau Leaping Tests" begin include("InterfaceI/regular_jumps.jl") end + @time @safetestset "Simple SSA Callback Test" begin include("InterfaceI/ssa_callback_test.jl") end + @time @safetestset "SIR Discrete Callback Test" begin include("InterfaceI/sir_model.jl") end + @time @safetestset "Callback Merging Tests" begin include("InterfaceI/callbacks.jl") end + @time @safetestset "Linear Reaction SSA Test" begin include("InterfaceI/linearreaction_test.jl") end + @time @safetestset "Mass Action Jump Tests; Gene Expr Model" begin include("InterfaceI/geneexpr_test.jl") end + @time @safetestset "Mass Action Jump Tests; Nonlinear Rx Model" begin include("InterfaceI/bimolerx_test.jl") end + @time @safetestset "Mass Action Jump Tests; Special Cases" begin include("InterfaceI/degenerate_rx_cases.jl") end + @time @safetestset "Mass Action Jump Tests; Floating Point Inputs" begin include("InterfaceI/fp_unknowns.jl") end + @time @safetestset "scale_rates Field Tests" begin include("InterfaceI/scale_rates_field_test.jl") end + @time @safetestset "Direct allocations test" begin include("InterfaceI/allocations.jl") end + @time @safetestset "Bracketing Tests" begin include("InterfaceI/bracketing.jl") end + @time @safetestset "Composition-Rejection Table Tests" begin include("InterfaceI/table_test.jl") end + @time @safetestset "Extinction test" begin include("InterfaceI/extinction_test.jl") end + return nothing + end, + "InterfaceII" => function () + @time @safetestset "Saveat Regression test" begin include("InterfaceII/saveat_regression.jl") end + @time @safetestset "Save_positions test" begin include("InterfaceII/save_positions.jl") end + @time @safetestset "Ensemble Uniqueness test" begin include("InterfaceII/ensemble_uniqueness.jl") end + @time @safetestset "Thread Safety test" begin include("InterfaceII/thread_safety.jl") end + @time @safetestset "Ensemble Problem Tests" begin include("InterfaceII/ensemble_problems.jl") end + @time @safetestset "A + B <--> C" begin include("InterfaceII/reversible_binding.jl") end + @time @safetestset "Remake tests" begin include("InterfaceII/remake_test.jl") end + @time @safetestset "ExtendedJumpArray remake tests" begin include("InterfaceII/extended_jump_array_remake.jl") end + @time @safetestset "Symbol based problem indexing" begin include("InterfaceII/jprob_symbol_indexing.jl") end + @time @safetestset "Long time accuracy test" begin include("InterfaceII/longtimes_test.jl") end + @time @safetestset "Hawkes process" begin include("InterfaceII/hawkes_test.jl") end + @time @safetestset "Reaction rates" begin include("InterfaceII/reaction_rates.jl") end + @time @safetestset "Hop rates" begin include("InterfaceII/hop_rates.jl") end + @time @safetestset "Topology" begin include("InterfaceII/topology.jl") end + @time @safetestset "Spatial bracketing Tests" begin include("InterfaceII/bracketing.jl") end + @time @safetestset "Spatial A + B <--> C" begin include("InterfaceII/ABC.jl") end + @time @safetestset "Spatially Varying Reaction Rates" begin include("InterfaceII/spatial_majump.jl") end + @time @safetestset "Pure diffusion" begin include("InterfaceII/diffusion.jl") end + return nothing + end, + "CUDA" => function () + activate_gpu_env() + @time @safetestset "GPU Tau Leaping test" begin include("gpu/regular_jumps.jl") end + return nothing + end, + "Correctness" => function () + activate_gpu_env() + return nothing + end, + ), + qa = joinpath(@__DIR__, "qa", "qa.jl"), + all = ["InterfaceI", "InterfaceII"], +) diff --git a/test/spatial/run_spatial_tests.jl b/test/shared/run_spatial_tests.jl similarity index 100% rename from test/spatial/run_spatial_tests.jl rename to test/shared/run_spatial_tests.jl