|
1 | | -using Pkg |
2 | | -using InteractiveUtils, SafeTestsets, Test |
| 1 | +using SafeTestsets, Test |
| 2 | +using SciMLTesting |
3 | 3 |
|
4 | | -@info sprint(InteractiveUtils.versioninfo) |
5 | | - |
6 | | -const TEST_GROUP = get(ENV, "BOUNDARYVALUEDIFFEQ_TEST_GROUP", "All") |
7 | | - |
8 | | -function activate_qa_env() |
9 | | - Pkg.activate(joinpath(@__DIR__, "qa")) |
10 | | - # On Julia < 1.11, the [sources] section in Project.toml is not honored. |
11 | | - # Manually Pkg.develop the local path dependencies so QA tests the PR branch code. |
12 | | - if VERSION < v"1.11.0-DEV.0" |
13 | | - Pkg.develop( |
14 | | - [ |
15 | | - Pkg.PackageSpec(path = joinpath(@__DIR__, "..")), |
16 | | - Pkg.PackageSpec(path = joinpath(@__DIR__, "..", "..", "BoundaryValueDiffEqCore")) |
17 | | - ] |
18 | | - ) |
19 | | - end |
20 | | - return Pkg.instantiate() |
21 | | -end |
22 | | - |
23 | | -@time begin |
24 | | - if TEST_GROUP == "Core" |
25 | | - # Representative light FIRK set covering both formulations' basic solves. |
26 | | - # Targeted by the uniform "Core" downgrade value. The full EXPANDED/NESTED |
27 | | - # groups below already include these basic tests, and "All" runs those |
28 | | - # groups, so "Core" is kept separate from "All" to avoid double execution. |
| 4 | +run_tests(; |
| 5 | + env = "BOUNDARYVALUEDIFFEQ_TEST_GROUP", |
| 6 | + # Core: representative light FIRK set covering both formulations' basic solves. |
| 7 | + # Targeted by the uniform "Core" downgrade value. The full EXPANDED/NESTED groups |
| 8 | + # already include these basic tests, and "All" runs those groups, so "Core" is |
| 9 | + # kept out of "All" (see the `all` list below) to avoid double execution. |
| 10 | + core = function () |
29 | 11 | @time @safetestset "FIRK Expanded Basic Tests" include("expanded/firk_basic_tests.jl") |
30 | | - @time @safetestset "FIRK Nested Basic Tests" include("nested/firk_basic_tests.jl") |
31 | | - end |
32 | | - |
33 | | - if TEST_GROUP == "EXPANDED" || TEST_GROUP == "All" |
34 | | - @time @safetestset "FIRK Expanded Basic Tests" include("expanded/firk_basic_tests.jl") |
35 | | - @time @safetestset "FIRK Expanded NLLS Tests" include("expanded/nlls_tests.jl") |
36 | | - @time @safetestset "FIRK Expanded AD Tests" include("expanded/ad_tests.jl") |
37 | | - @time @safetestset "FIRK Expanded Ensemble Tests" include("expanded/ensemble_tests.jl") |
38 | | - @time @safetestset "FIRK Expanded Singular BVP Tests" include("expanded/singular_bvp_tests.jl") |
39 | | - @time @safetestset "FIRK Expanded VectorOfVector Initials Tests" include("expanded/vectorofvector_initials_tests.jl") |
40 | | - end |
41 | | - |
42 | | - if TEST_GROUP == "NESTED" || TEST_GROUP == "All" |
43 | | - @time @safetestset "FIRK Nested Basic Tests" include("nested/firk_basic_tests.jl") |
44 | | - @time @safetestset "FIRK Nested NLLS Tests" include("nested/nlls_tests.jl") |
45 | | - @time @safetestset "FIRK Nested Ensemble Tests" include("nested/ensemble_tests.jl") |
46 | | - @time @safetestset "FIRK Nested VectorOfVector Initials Tests" include("nested/vectorofvector_initials_tests.jl") |
47 | | - end |
48 | | - |
49 | | - if (TEST_GROUP == "QA" || TEST_GROUP == "All") && isempty(VERSION.prerelease) |
50 | | - activate_qa_env() |
51 | | - @time @safetestset "Quality Assurance" include("qa/qa.jl") |
52 | | - end |
53 | | -end |
| 12 | + return @time @safetestset "FIRK Nested Basic Tests" include("nested/firk_basic_tests.jl") |
| 13 | + end, |
| 14 | + groups = Dict( |
| 15 | + "EXPANDED" => function () |
| 16 | + @time @safetestset "FIRK Expanded Basic Tests" include("expanded/firk_basic_tests.jl") |
| 17 | + @time @safetestset "FIRK Expanded NLLS Tests" include("expanded/nlls_tests.jl") |
| 18 | + @time @safetestset "FIRK Expanded AD Tests" include("expanded/ad_tests.jl") |
| 19 | + @time @safetestset "FIRK Expanded Ensemble Tests" include("expanded/ensemble_tests.jl") |
| 20 | + @time @safetestset "FIRK Expanded Singular BVP Tests" include("expanded/singular_bvp_tests.jl") |
| 21 | + return @time @safetestset "FIRK Expanded VectorOfVector Initials Tests" include("expanded/vectorofvector_initials_tests.jl") |
| 22 | + end, |
| 23 | + "NESTED" => function () |
| 24 | + @time @safetestset "FIRK Nested Basic Tests" include("nested/firk_basic_tests.jl") |
| 25 | + @time @safetestset "FIRK Nested NLLS Tests" include("nested/nlls_tests.jl") |
| 26 | + @time @safetestset "FIRK Nested Ensemble Tests" include("nested/ensemble_tests.jl") |
| 27 | + return @time @safetestset "FIRK Nested VectorOfVector Initials Tests" include("nested/vectorofvector_initials_tests.jl") |
| 28 | + end, |
| 29 | + ), |
| 30 | + qa = (; |
| 31 | + env = joinpath(@__DIR__, "qa"), |
| 32 | + body = function () |
| 33 | + # QA (Aqua) runs on release + LTS Julia only; skip on prerelease. |
| 34 | + isempty(VERSION.prerelease) || return nothing |
| 35 | + return @time @safetestset "Quality Assurance" include("qa/qa.jl") |
| 36 | + end, |
| 37 | + ), |
| 38 | + # "All" runs EXPANDED + NESTED + QA. "Core" is intentionally excluded: its basic |
| 39 | + # tests are already covered inside EXPANDED and NESTED. |
| 40 | + all = ["EXPANDED", "NESTED", "QA"], |
| 41 | +) |
0 commit comments